ToSolverConfigModel { public SolverConfigModel get() { SolverConfigModel model = new SolverConfigModel(); model.setTerminationConfig(create(solverConfig.getTerminationConfig())); model.setScoreDirectorFactoryConfig(create(solverConfig.getScoreDirectorFactoryConfig())); model.setPhaseConfigList(create(solverConfig.getPhaseConfigList())); return model; } ToSolverConfigModel(final SolverConfig solverConfig); SolverConfigModel get();  }
@Test public void get() { ToSolverConfigModel toSolverConfigModel = new ToSolverConfigModel(getSolverConfig()); SolverConfigModel solverConfigModel = toSolverConfigModel.get(); TerminationConfigModel terminationConfigModel = solverConfigModel.getTermination(); assertEquals(Long.valueOf(1), terminationConfigModel.getMillisecondsSpentLimit()); assertEquals(1, terminationConfigModel.getTerminationConfigList().size()); assertEquals(Boolean.TRUE, terminationConfigModel.getTerminationConfigList().get(0).getBestScoreFeasible()); assertEquals("testKsession", solverConfigModel.getScoreDirectorFactoryConfig().getKSessionName()); assertEquals(2, solverConfigModel.getPhaseConfigList().size()); ConstructionHeuristicPhaseConfigModel constructionHeuristicPhaseConfigModel = (ConstructionHeuristicPhaseConfigModel) solverConfigModel.getPhaseConfigList().get(0); assertEquals(ConstructionHeuristicType.FIRST_FIT, constructionHeuristicPhaseConfigModel.getConstructionHeuristicType()); LocalSearchPhaseConfigModel localSearchPhaseConfigModel = (LocalSearchPhaseConfigModel) solverConfigModel.getPhaseConfigList().get(1); assertEquals(LocalSearchType.TABU_SEARCH, localSearchPhaseConfigModel.getLocalSearchType()); }