// Path: properlty/src/test/java/com/ufoscout/properlty/ProperltyBaseTest.java
// public abstract class ProperltyBaseTest {
// 
// 	@Rule
// 	public final TestName name = new TestName();
// 
// 	private Date startTime;
// 
// 	@Before
// 	public void setUpBeforeTest() {
// 		startTime = new Date();
// 		System.out.println("===================================================================");
// 		System.out.println("BEGIN TEST " + name.getMethodName());
// 		System.out.println("===================================================================");
// 
// 	}
// 
// 	@After
// 	public void tearDownAfterTest() {
// 		final String time = new BigDecimal(new Date().getTime() - startTime.getTime()).divide(new BigDecimal(1000)).toString();
// 		System.out.println("===================================================================");
// 		System.out.println("END TEST " + name.getMethodName());
// 		System.out.println("Execution time: " + time + " seconds");
// 		System.out.println("===================================================================");
// 	}
// 
// }
// 
// Path: properlty-common/src/main/java/com/ufoscout/properlty/exception/UnresolvablePlaceholdersException.java
// public class UnresolvablePlaceholdersException extends RuntimeException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	public UnresolvablePlaceholdersException(String message) {
// 		super(message);
// 	}
// 
// }
// 
// Path: properlty-common/src/main/java/com/ufoscout/properlty/reader/ProgrammaticPropertiesReader.java
// public class ProgrammaticPropertiesReader implements Reader {
// 
// 	private final Map<String, PropertyValue> properties = new HashMap<>();
// 
// 	ProgrammaticPropertiesReader() {}
// 
// 	@Override
// 	public Map<String, PropertyValue> read() {
// 		return properties;
// 	}
// 
// 	/**
// 	 * Add a new property
// 	 *
// 	 * @param key
// 	 * @param value
// 	 * @return
// 	 */
// 	public ProgrammaticPropertiesReader add(String key, String value) {
// 		properties.put(key, PropertyValue.of(value));
// 		return this;
// 	}
// 
// 	/**
// 	 * Add a new property
// 	 *
// 	 * @param key
// 	 * @param value
// 	 * @return
// 	 */
// 	public ProgrammaticPropertiesReader add(String key, PropertyValue value) {
// 		properties.put(key, value);
// 		return this;
// 	}
// 
// }
// 
// Path: properlty-common/src/main/java/com/ufoscout/properlty/reader/Properties.java
// public class Properties {
// 
// 	public static ProgrammaticPropertiesReader add(String key, String value) {
// 		return new ProgrammaticPropertiesReader().add(key, value);
// 	}
// 
// 	public static ProgrammaticPropertiesReader add(String key, PropertyValue value) {
// 		return new ProgrammaticPropertiesReader().add(key, value);
// 	}
// 
// }
// 
// Path: properlty-common/src/main/java/com/ufoscout/properlty/reader/PropertyValue.java
// public class PropertyValue {
// 
// 	private String value = "";
// 	private boolean resolvable = true;
// 
// 	public static PropertyValue of(String value) {
// 		return new PropertyValue().value(value);
// 	}
// 
// 	/**
// 	 * The property value
// 	 *
// 	 * @return the value
// 	 */
// 	public String getValue() {
// 		return value;
// 	}
// 	/**
// 	 * Set the property value
// 	 * @param value the value to set
// 	 */
// 	public PropertyValue value(String value) {
// 		this.value = value;
// 		return this;
// 	}
// 	/**
// 	 * Whether this property contains placeholders that should be resolved. Default is true.
// 	 *
// 	 * @return the replaceable
// 	 */
// 	public boolean isResolvable() {
// 		return resolvable;
// 	}
// 	/**
// 	 * Whether this property contains placeholders that should be resolved. Default is true.
// 	 *
// 	 * @param resolvable
// 	 */
// 	public PropertyValue resolvable(boolean resolvable) {
// 		this.resolvable = resolvable;
// 		return this;
// 	}
// 
// 
// 
// }


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import com.ufoscout.properlty.ProperltyBaseTest;
import com.ufoscout.properlty.exception.UnresolvablePlaceholdersException;
import com.ufoscout.properlty.reader.ProgrammaticPropertiesReader;
import com.ufoscout.properlty.reader.Properties;
import com.ufoscout.properlty.reader.PropertyValue;
import java.util.Map;
import org.junit.Test;
	}

	@Test
	public void shouldDetectDefaultValueAndReplaceRecursively() {
		final ProgrammaticPropertiesReader properties = Properties
		.add("key.one", "${value1:defaultValue1}")
		.add("key.two", "${key.one}");

		boolean ignoreNotResolvable = true;
		final boolean caseSensitive = true;
		final Map<String, PropertyValue> output =
				new ReplacerDecoratorReader(properties, "${", "}", ":", ignoreNotResolvable, caseSensitive).read();

		assertNotNull(output);

		assertEquals(2, output.size());

		assertEquals("defaultValue1", output.get("key.one").getValue());
		assertEquals("defaultValue1", output.get("key.two").getValue());

	}

	@Test
	public void shouldDetectDefaultValueAndReplaceRecursively2() {
		final ProgrammaticPropertiesReader properties = Properties
		.add("key.one", "${value1:defaultValue1}")
		.add("key.two", "${key.one:defaultValue2}");

		boolean ignoreNotResolvable = true;
		final boolean caseSensitive = true;
// Path: properlty/src/test/java/com/ufoscout/properlty/ProperltyBaseTest.java
// public abstract class ProperltyBaseTest {
// 
// 	@Rule
// 	public final TestName name = new TestName();
// 
// 	private Date startTime;
// 
// 	@Before
// 	public void setUpBeforeTest() {
// 		startTime = new Date();
// 		System.out.println("===================================================================");
// 		System.out.println("BEGIN TEST " + name.getMethodName());
// 		System.out.println("===================================================================");
// 
// 	}
// 
// 	@After
// 	public void tearDownAfterTest() {
// 		final String time = new BigDecimal(new Date().getTime() - startTime.getTime()).divide(new BigDecimal(1000)).toString();
// 		System.out.println("===================================================================");
// 		System.out.println("END TEST " + name.getMethodName());
// 		System.out.println("Execution time: " + time + " seconds");
// 		System.out.println("===================================================================");
// 	}
// 
// }
// 
// Path: properlty-common/src/main/java/com/ufoscout/properlty/exception/UnresolvablePlaceholdersException.java
// public class UnresolvablePlaceholdersException extends RuntimeException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	public UnresolvablePlaceholdersException(String message) {
// 		super(message);
// 	}
// 
// }
// 
// Path: properlty-common/src/main/java/com/ufoscout/properlty/reader/ProgrammaticPropertiesReader.java
// public class ProgrammaticPropertiesReader implements Reader {
// 
// 	private final Map<String, PropertyValue> properties = new HashMap<>();
// 
// 	ProgrammaticPropertiesReader() {}
// 
// 	@Override
// 	public Map<String, PropertyValue> read() {
// 		return properties;
// 	}
// 
// 	/**
// 	 * Add a new property
// 	 *
// 	 * @param key
// 	 * @param value
// 	 * @return
// 	 */
// 	public ProgrammaticPropertiesReader add(String key, String value) {
// 		properties.put(key, PropertyValue.of(value));
// 		return this;
// 	}
// 
// 	/**
// 	 * Add a new property
// 	 *
// 	 * @param key
// 	 * @param value
// 	 * @return
// 	 */
// 	public ProgrammaticPropertiesReader add(String key, PropertyValue value) {
// 		properties.put(key, value);
// 		return this;
// 	}
// 
// }
// 
// Path: properlty-common/src/main/java/com/ufoscout/properlty/reader/Properties.java
// public class Properties {
// 
// 	public static ProgrammaticPropertiesReader add(String key, String value) {
// 		return new ProgrammaticPropertiesReader().add(key, value);
// 	}
// 
// 	public static ProgrammaticPropertiesReader add(String key, PropertyValue value) {
// 		return new ProgrammaticPropertiesReader().add(key, value);
// 	}
// 
// }
// 
// Path: properlty-common/src/main/java/com/ufoscout/properlty/reader/PropertyValue.java
// public class PropertyValue {
// 
// 	private String value = "";
// 	private boolean resolvable = true;
// 
// 	public static PropertyValue of(String value) {
// 		return new PropertyValue().value(value);
// 	}
// 
// 	/**
// 	 * The property value
// 	 *
// 	 * @return the value
// 	 */
// 	public String getValue() {
// 		return value;
// 	}
// 	/**
// 	 * Set the property value
// 	 * @param value the value to set
// 	 */
// 	public PropertyValue value(String value) {
// 		this.value = value;
// 		return this;
// 	}
// 	/**
// 	 * Whether this property contains placeholders that should be resolved. Default is true.
// 	 *
// 	 * @return the replaceable
// 	 */
// 	public boolean isResolvable() {
// 		return resolvable;
// 	}
// 	/**
// 	 * Whether this property contains placeholders that should be resolved. Default is true.
// 	 *
// 	 * @param resolvable
// 	 */
// 	public PropertyValue resolvable(boolean resolvable) {
// 		this.resolvable = resolvable;
// 		return this;
// 	}
// 
// 
// 
// }


// Path: properlty-common/src/test/java/com/ufoscout/properlty/reader/decorator/ReplacerDecoratorReaderTest.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import com.ufoscout.properlty.ProperltyBaseTest;
import com.ufoscout.properlty.exception.UnresolvablePlaceholdersException;
import com.ufoscout.properlty.reader.ProgrammaticPropertiesReader;
import com.ufoscout.properlty.reader.Properties;
import com.ufoscout.properlty.reader.PropertyValue;
import java.util.Map;
import org.junit.Test;

	}

	@Test
	public void shouldDetectDefaultValueAndReplaceRecursively() {
		final ProgrammaticPropertiesReader properties = Properties
		.add("key.one", "${value1:defaultValue1}")
		.add("key.two", "${key.one}");

		boolean ignoreNotResolvable = true;
		final boolean caseSensitive = true;
		final Map<String, PropertyValue> output =
				new ReplacerDecoratorReader(properties, "${", "}", ":", ignoreNotResolvable, caseSensitive).read();

		assertNotNull(output);

		assertEquals(2, output.size());

		assertEquals("defaultValue1", output.get("key.one").getValue());
		assertEquals("defaultValue1", output.get("key.two").getValue());

	}

	@Test
	public void shouldDetectDefaultValueAndReplaceRecursively2() {
		final ProgrammaticPropertiesReader properties = Properties
		.add("key.one", "${value1:defaultValue1}")
		.add("key.two", "${key.one:defaultValue2}");

		boolean ignoreNotResolvable = true;
		final boolean caseSensitive = true;
		final Map<String, PropertyValue> output =