assertEquals(1.0, termination.calculateSolverTimeGradient(solverScope), 0.0);
}
@Test
public void phaseTermination() {
FeasibilityScoreDefinition scoreDefinition = mock(FeasibilityScoreDefinition.class);
when(scoreDefinition.getFeasibleLevelsSize()).thenReturn(1);
Termination termination = new BestScoreFeasibleTermination(scoreDefinition, new double[]{});
AbstractPhaseScope phaseScope = mock(AbstractPhaseScope.class);
when(phaseScope.getScoreDefinition()).thenReturn(new HardSoftScoreDefinition());
when(phaseScope.getStartingScore()).thenReturn(HardSoftScore.valueOf(-100, -100));
when(phaseScope.isBestSolutionInitialized()).thenReturn(true);