### Question:
FactoryFinder { public static void setObjectFactory(ObjectFactory objectFactory) { FactoryFinder.objectFactory = objectFactory; } FactoryFinder(Class<T> factoryType, String path); static ObjectFactory getObjectFactory(); static void setObjectFactory(ObjectFactory objectFactory); T newInstance(String key); void registerProviderFactory(String scheme, T factory);  }### Answer:
@Test public void testSetObjectFactory() { TestObjectFactory testFactory = new TestObjectFactory(); assertNotNull(FactoryFinder.getObjectFactory()); assertNotSame(testFactory, FactoryFinder.getObjectFactory()); FactoryFinder.ObjectFactory oldObjectFactory = FactoryFinder.getObjectFactory(); FactoryFinder.setObjectFactory(testFactory); assertSame(testFactory, FactoryFinder.getObjectFactory()); FactoryFinder.setObjectFactory(oldObjectFactory); }