DefaultResourceFactory implements ResourceFactory { public static DefaultResourceFactory getInstance() { return INSTANCE; } 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 testGetInstance() { ResourceFactory factory1 = DefaultResourceFactory.getInstance(); ResourceFactory factory2 = DefaultResourceFactory.getInstance(); assertNotNull("expected valid factory", factory1); assertSame("expected singleton instance", factory1, factory2); }