@Test public void returnsInstanceGivenInCreationOfObjectFactory() { Object instance = new Object(); ObjectModel objectModel = mock(ObjectModel.class); SingletonObjectFactory singletonObjectFactory = new SingletonObjectFactory<>(objectModel, instance); Object result = singletonObjectFactory.getInstance(null); assertSame(instance, result); }
@Override public Object getInstance(ApplicationContext context) { return getInstance(); }
SingletonObjectFactory implements ObjectFactory<T> { @Override public Object getInstance(ApplicationContext context) { return getInstance(); } }
SingletonObjectFactory implements ObjectFactory<T> { @Override public Object getInstance(ApplicationContext context) { return getInstance(); } SingletonObjectFactory(T model, Object object); }
SingletonObjectFactory implements ObjectFactory<T> { @Override public Object getInstance(ApplicationContext context) { return getInstance(); } SingletonObjectFactory(T model, Object object); @Override Object getInstance(ApplicationContext context); Object getInstance(); @Override T getObjectModel(); }
SingletonObjectFactory implements ObjectFactory<T> { @Override public Object getInstance(ApplicationContext context) { return getInstance(); } SingletonObjectFactory(T model, Object object); @Override Object getInstance(ApplicationContext context); Object getInstance(); @Override T getObjectModel();  }