DefaultResourceFactory implements ResourceFactory { @Override public PropertyMap getResourceAsProperties(String path) throws IOException { return getResourceAsProperties(path, this.substitutions); } DefaultResourceFactory();  DefaultResourceFactory(PropertyMap substitutions); static DefaultResourceFactory getInstance(); @Override URL getResource(String path); @Override InputStream getResourceAsStream(String path); @Override PropertyMap getResourceAsProperties(String path); @Override PropertyMap getResourceAsProperties(String path, InputStream input); @Override PropertyMap getResourceAsProperties(String path, 
                                               PropertyMap substitutions); @Override PropertyMap getResourceAsProperties(String path, InputStream input,
                                               PropertyMap substitutions);  }
@Test public void testGetPropertiesClasspath() throws Exception { System.setProperty("substitution", "TEST"); ResourceFactory factory = new DefaultResourceFactory(SubstitutionFactory.getDefaults()); PropertyMap properties = factory.getResourceAsProperties( "classpath:/org/teatrove/trove/util/resources/".concat( "DefaultResourceFactoryTest.properties" ) ); assertEquals("expected classpath type property", "classpath", properties.getString("type")); assertEquals("expected substitution properties", "TEST", properties.getString("substitution")); assertEquals("expected default properties", "VALID", properties.getString("invalid")); }