// Path: src/main/java/com/turn/camino/render/RenderException.java
// public class RenderException extends Exception {
// 
// 	/**
// 	 * Constructor
// 	 *
// 	 * @param message error message
// 	 */
// 	public RenderException(String message) {
// 		super(message);
// 	}
// 
// 	/**
// 	 * Constructor
// 	 *
// 	 * @param message error message
// 	 * @param throwable underlying exception
// 	 */
// 	public RenderException(String message, Throwable throwable) {
// 		super(message, throwable);
// 	}
// 
// 	/**
// 	 * Constructor
// 	 *
// 	 * @param throwable underlying exception
// 	 */
// 	public RenderException(Throwable throwable) {
// 		super(throwable);
// 	}
// }


import org.testng.annotations.Test;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import com.google.common.collect.ImmutableMap;
import com.google.common.io.Files;
import com.turn.camino.config.*;
import com.turn.camino.render.RenderException;
import java.io.*;
import java.net.URL;
import java.util.List;
import java.util.TimeZone;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import com.google.common.collect.ImmutableList;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.testng.annotations.BeforeClass;
/*
 * Copyright (C) 2014-2018, Amobee Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 */
package com.turn.camino;





/**
 * Integration test for Camino
 *
 * Uses its own source code for test
 *
 * @author llo
 */
@Test
public class CaminoIntegrationTest {

	private final static double EPSILON = 1e-6;

	private final static String CAMINO_CONFIG_TEMPLATE = "{\n" +
			"  \"properties\": {" +
			"    \"pkv\": \"readme.1\"\n" +
			"  },\n" +
			"  \"paths\": [\n" +
			"    {\n" +
			"      \"name\": \"readme\",\n" +
			"      \"tags\": {\"pk\": \"<%%=pkv%%>\"},\n" +
			"      \"value\": \"%s\"\n" +
			"    }\n" +
			"  ]\n" +
			"}";

	private File root;
	private File readme;

	@BeforeClass
	public void setUp() {
		URL url = CaminoIntegrationTest.class.getProtectionDomain().getCodeSource().getLocation();
		this.root = new File(url.getPath()).getParentFile().getParentFile();
		this.readme = new File(root, "README.md");
	}

	/**
	 * Test camino
	 *
	 * @throws IOException
	 * @throws WrongTypeException
	 * @throws RenderException
	 */
	@Test
// Path: src/main/java/com/turn/camino/render/RenderException.java
// public class RenderException extends Exception {
// 
// 	/**
// 	 * Constructor
// 	 *
// 	 * @param message error message
// 	 */
// 	public RenderException(String message) {
// 		super(message);
// 	}
// 
// 	/**
// 	 * Constructor
// 	 *
// 	 * @param message error message
// 	 * @param throwable underlying exception
// 	 */
// 	public RenderException(String message, Throwable throwable) {
// 		super(message, throwable);
// 	}
// 
// 	/**
// 	 * Constructor
// 	 *
// 	 * @param throwable underlying exception
// 	 */
// 	public RenderException(Throwable throwable) {
// 		super(throwable);
// 	}
// }


// Path: src/test/java/com/turn/camino/CaminoIntegrationTest.java
import org.testng.annotations.Test;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import com.google.common.collect.ImmutableMap;
import com.google.common.io.Files;
import com.turn.camino.config.*;
import com.turn.camino.render.RenderException;
import java.io.*;
import java.net.URL;
import java.util.List;
import java.util.TimeZone;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import com.google.common.collect.ImmutableList;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.testng.annotations.BeforeClass;

/*
 * Copyright (C) 2014-2018, Amobee Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 */
package com.turn.camino;





/**
 * Integration test for Camino
 *
 * Uses its own source code for test
 *
 * @author llo
 */
@Test
public class CaminoIntegrationTest {

	private final static double EPSILON = 1e-6;

	private final static String CAMINO_CONFIG_TEMPLATE = "{\n" +
			"  \"properties\": {" +
			"    \"pkv\": \"readme.1\"\n" +
			"  },\n" +
			"  \"paths\": [\n" +
			"    {\n" +
			"      \"name\": \"readme\",\n" +
			"      \"tags\": {\"pk\": \"<%%=pkv%%>\"},\n" +
			"      \"value\": \"%s\"\n" +
			"    }\n" +
			"  ]\n" +
			"}";

	private File root;
	private File readme;

	@BeforeClass
	public void setUp() {
		URL url = CaminoIntegrationTest.class.getProtectionDomain().getCodeSource().getLocation();
		this.root = new File(url.getPath()).getParentFile().getParentFile();
		this.readme = new File(root, "README.md");
	}

	/**
	 * Test camino
	 *
	 * @throws IOException
	 * @throws WrongTypeException
	 * @throws RenderException
	 */
	@Test
	public void testCamino() throws IOException, WrongTypeException, RenderException,