### Question:
ConfigurablePropertiesModule extends AbstractModule { protected Properties initProperties() { Resource propertyResource = getPropertyResource(); try { Properties initProperties = loadPropertiesFromPropertyResource(propertyResource); overridePropertyValuesWithSystemProperties(initProperties, overridableProperties()); replacePlaceholderWithValue(initProperties, "%contextRoot%", getContextRootValue(initProperties)); return initProperties; } catch (IOException e) { throw new CreationException(Arrays.asList( new Message("Unable to load properties from resource" + ". " + e.getMessage()) )); } } ConfigurablePropertiesModule();   }### Answer:
@Test public void testCustomProperties() throws Exception { System.setProperty("rave-shindig.override.properties", "classpath:rave.shindig.custom.properties"); TestableConfigurablePropertiesModule propertiesModule = new TestableConfigurablePropertiesModule(); Properties properties = propertiesModule.initProperties(); assertEquals("Custom container.js location", "res: properties.getProperty("shindig.containers.default")); assertEquals("Custom contextRoot", "http: properties.getProperty("shindig.signing.global-callback-url")); assertEquals("Custom shindig host", "127.0.0.1", properties.getProperty("shindig.host")); System.clearProperty("rave-shindig.override.properties"); }
@Test public void testCustomProperties_WithReplacedContextRoot() throws Exception { System.setProperty("shindig.contextroot", "shindigcontext"); System.setProperty("shindig.host", "127.0.0.2"); System.setProperty("rave-shindig.override.properties", "classpath:rave.shindig.custom.properties"); TestableConfigurablePropertiesModule propertiesModule = new TestableConfigurablePropertiesModule(); Properties properties = propertiesModule.initProperties(); assertEquals("Custom container.js location", "res: properties.getProperty("shindig.containers.default")); assertEquals("Replaced contextRoot", "http: properties.getProperty("shindig.signing.global-callback-url")); assertEquals("Different shindig host", "127.0.0.2", properties.getProperty("shindig.host")); System.clearProperty("shindig.contextroot"); System.clearProperty("shindig.host"); System.clearProperty("rave-shindig.override.properties"); }