### Question:
ConfigurablePropertiesModule extends AbstractModule { static void replacePlaceholderWithValue(Properties properties, String placeholder, String value) { for (Map.Entry entry : properties.entrySet()) { String propertyValue = (String) entry.getValue(); if (propertyValue != null && propertyValue.contains(placeholder)) { properties.put(entry.getKey(), propertyValue.replace((placeholder), value)); } } } ConfigurablePropertiesModule();   }### Answer:
@Test public void replacePlaceholderWithValue() throws Exception { Properties properties = new Properties(); properties.setProperty("key1", "%placeholder%"); properties.setProperty("key2", "Not to be replaced"); properties.setProperty("key3", "Contains %placeholder% to replace"); String placeholder = "%placeholder%"; String replaceValue = "myValue"; ConfigurablePropertiesModule.replacePlaceholderWithValue(properties, placeholder, replaceValue); Assert.assertEquals(replaceValue, properties.getProperty("key1")); Assert.assertEquals("Not to be replaced", properties.getProperty("key2")); Assert.assertEquals("Contains myValue to replace", properties.getProperty("key3")); }