global.getProperty().set("${test.replace.key}", "testReplaceKey");
global.getProperty().set("${test.replace.key1}", "testReplaceKey1");
global.getProperty().set("someKey3", "testReplaceKey1");
global.getProperty().set("${test.replace.key}", "testReplaceKey");
global.getProperty().set("test.replace.key", "someKey");
GlobalInfo info = new OwnGlobalInfo();
info.init(global, null);
String val = info.get("someKey", null);
assertNotNull("The value must be set", val);
assertEquals("wrong value of replaced key", "testReplaceKey", val);
val = info.get("${test.replace.key1}", null);
assertNotNull("The value must be set", val);
val = global.getProperty().get("someKey3", (String)null);
assertNotNull("The value must be set", val);
Properties props = new Properties();
props.put("one", "one");
val = props.getProperty("one");
assertNotNull("The value must be set", val);
props.remove("one");
val = props.getProperty("one");
assertNull("The value must NOT be set", val);
global.getProperty().removeProperty("someKey3");
val = global.getProperty().get("someKey3", (String)null);
assertNull("The value must NOT be set", val);
val = info.get("${test.replace.key}", null);
assertNotNull("The value must be set", val);
val = global.getProperty().get("someKey3", (String)null);
assertNull("The value must NOT be set", val);