LocalSearchPhaseScope phaseScope = createPhaseScope();
forager.phaseStarted(phaseScope);
LocalSearchStepScope stepScope = createStepScope(phaseScope);
forager.stepStarted(stepScope);
// Pre conditions
LocalSearchMoveScope a = createMoveScope(stepScope, SimpleScore.valueOf(-20), false);
LocalSearchMoveScope b = createMoveScope(stepScope, SimpleScore.valueOf(-1), false);
LocalSearchMoveScope c = createMoveScope(stepScope, SimpleScore.valueOf(-20), false);
LocalSearchMoveScope d = createMoveScope(stepScope, SimpleScore.valueOf(-2), false);
LocalSearchMoveScope e = createMoveScope(stepScope, SimpleScore.valueOf(-300), false);
// Do stuff
forager.addMove(a);
assertFalse(forager.isQuitEarly());
forager.addMove(b);
assertFalse(forager.isQuitEarly());
forager.addMove(c);
assertFalse(forager.isQuitEarly());
forager.addMove(d);
assertFalse(forager.isQuitEarly());
forager.addMove(e);
assertFalse(forager.isQuitEarly());
LocalSearchMoveScope pickedScope = forager.pickMove(stepScope);
// Post conditions
assertSame(b, pickedScope);
forager.phaseEnded(phaseScope);
}