@Test public void shouldCreateInjector() { Class<AMGuiceModule> moduleAnnotation = AMGuiceModule.class; Set<Class<?>> modules = new HashSet<Class<?>>(asList(TestModule1.class, TestModule2.class)); given(guiceConfiguration.getGuiceModuleClasses(moduleAnnotation)).willReturn(modules); TestModule1 testModule1 = mock(TestModule1.class); given(moduleCreator.createInstance(TestModule1.class)).willReturn(testModule1); TestModule2 testModule2 = mock(TestModule2.class); given(moduleCreator.createInstance(TestModule2.class)).willReturn(testModule2); Injector mockInjector = mock(Injector.class); given(injectorCreator.createInjector(Matchers.<Iterable<? extends Module>>anyObject())) .willReturn(mockInjector); Injector injector = injectorFactory.createInjector(moduleAnnotation); assertEquals(injector, mockInjector); }
public synchronized Injector createInjector(Class<? extends Annotation> moduleAnnotation) { return injectorCreator.createInjector(createModules(moduleAnnotation)); }
InjectorFactory { public synchronized Injector createInjector(Class<? extends Annotation> moduleAnnotation) { return injectorCreator.createInjector(createModules(moduleAnnotation)); } }
InjectorFactory { public synchronized Injector createInjector(Class<? extends Annotation> moduleAnnotation) { return injectorCreator.createInjector(createModules(moduleAnnotation)); } InjectorFactory(GuiceConfiguration guiceConfiguration, GuiceModuleCreator moduleCreator,
            GuiceInjectorCreator injectorCreator); }
InjectorFactory { public synchronized Injector createInjector(Class<? extends Annotation> moduleAnnotation) { return injectorCreator.createInjector(createModules(moduleAnnotation)); } InjectorFactory(GuiceConfiguration guiceConfiguration, GuiceModuleCreator moduleCreator,
            GuiceInjectorCreator injectorCreator); synchronized Injector createInjector(Class<? extends Annotation> moduleAnnotation); }
InjectorFactory { public synchronized Injector createInjector(Class<? extends Annotation> moduleAnnotation) { return injectorCreator.createInjector(createModules(moduleAnnotation)); } InjectorFactory(GuiceConfiguration guiceConfiguration, GuiceModuleCreator moduleCreator,
            GuiceInjectorCreator injectorCreator); synchronized Injector createInjector(Class<? extends Annotation> moduleAnnotation);  }