@Test
public void testSubstituteConfigKey() {

	String deprecatedKey1 ="deprecated-key";
	String deprecatedKey2 ="another-out_of-date_key";
	String deprecatedKey3 ="yet-one-more";
	String designatedKey1 ="newkey1";
	String designatedKey2 ="newKey2";
	String designatedKey3 ="newKey3";
	String value1 = "value1";
	String value2_designated = "designated-value2";
	String value2_deprecated = "deprecated-value2";
	// config contains only deprecated key 1, and for key 2 both deprecated and designated
	Configuration cfg = new Configuration();
	cfg.setString(deprecatedKey1, value1);
	cfg.setString(deprecatedKey2, value2_deprecated);
	cfg.setString(designatedKey2, value2_designated);
	BootstrapTools.substituteDeprecatedConfigKey(cfg, deprecatedKey1, designatedKey1);
	BootstrapTools.substituteDeprecatedConfigKey(cfg, deprecatedKey2, designatedKey2);
	BootstrapTools.substituteDeprecatedConfigKey(cfg, deprecatedKey3, designatedKey3);
	// value 1 should be set to designated
	assertEquals(value1, cfg.getString(designatedKey1, null));
	// value 2 should not have been set, since it had a value already
	assertEquals(value2_designated, cfg.getString(designatedKey2, null));
	// nothing should be in there for key 3
	assertNull(cfg.getString(designatedKey3, null));
	assertNull(cfg.getString(deprecatedKey3, null));
}