IndividualCompleterModule extends Opt4JModule { public void setType(Type type) { this.type = type; }  Type getType(); void setType(Type type); int getThreads(); void setThreads(int threads); @Override void config();  }
@Test public void configSequential() { IndividualCompleterModule module = new IndividualCompleterModule(); module.setType(Type.SEQUENTIAL); Injector injector = Guice.createInjector(new MockProblemModule(), module); IndividualCompleter completer = injector.getInstance(IndividualCompleter.class); Assert.assertEquals(SequentialIndividualCompleter.class, completer.getClass()); }
@Test public void configParallel() { IndividualCompleterModule module = new IndividualCompleterModule(); module.setType(Type.PARALLEL); Injector injector = Guice.createInjector(new MockProblemModule(), module); IndividualCompleter completer = injector.getInstance(IndividualCompleter.class); Assert.assertEquals(ParallelIndividualCompleter.class, completer.getClass()); }