assertBestSolution(solver, scoreAttainedString);
}
private XmlSolverFactory buildSolverFactory(String scoreAttainedString, EnvironmentMode environmentMode) {
XmlSolverFactory solverFactory = new XmlSolverFactory();
solverFactory.configure(createSolverConfigResource());
solverFactory.getSolverConfig().setEnvironmentMode(environmentMode);
TerminationConfig terminationConfig = new TerminationConfig();
terminationConfig.setScoreAttained(scoreAttainedString);
solverFactory.getSolverConfig().setTerminationConfig(terminationConfig);
return solverFactory;