private Injector createInjectorFor(final Class<?>[] classes) throws InitializationError {
  final List<Module> modules=new ArrayList<>();
  if (classes != null) {
    for (    final Class<?> module : Arrays.asList(classes)) {
      try {
        modules.add((Module)module.newInstance());
      }
 catch (      final ReflectiveOperationException exception) {
        throw new InitializationError(exception);
      }
    }
  }
  return Guice.createInjector(modules);
}

private Injector createInjectorFor ( final Class < ? > [ ] classes ) throws InitializationError { final List < Module > modules = new ArrayList < > ( ) ; if ( classes != null ) { for ( final Class < ? > module : Arrays . asList ( classes ) ) { try { modules . add ( ( Module ) module . newInstance ( ) ) ; } catch ( final ReflectiveOperationException exception ) { throw new InitializationError ( exception ) ; } } } return Guice . createInjector ( modules ) ; }
create a guice injector for the class under test .
