@Test (expectedExceptions = IllegalArgumentException.class) public void shouldFailToCreateInjectorIfModuleDoesNotImplementInterface() { Class<AMGuiceModule> moduleAnnotation = AMGuiceModule.class; Set<Class<?>> modules = new HashSet<Class<?>>(asList(TestModule1.class, BadModule.class, TestModule2.class)); given(guiceConfiguration.getGuiceModuleClasses(moduleAnnotation)).willReturn(modules); injectorFactory.createInjector(moduleAnnotation); fail(); }
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);  }