LocalSearchSolverPhaseScope solverPhaseScope = new LocalSearchSolverPhaseScope(solverScope);
tabuAcceptor.phaseStarted(solverPhaseScope);
LocalSearchStepScope stepScope0 = new LocalSearchStepScope(solverPhaseScope);
stepScope0.setStepIndex(0);
MoveScope moveScope1 = buildMoveScope(stepScope0, e1);
assertEquals(true, tabuAcceptor.isAccepted(buildMoveScope(stepScope0, e0)));
assertEquals(true, tabuAcceptor.isAccepted(moveScope1));
assertEquals(true, tabuAcceptor.isAccepted(buildMoveScope(stepScope0, e2)));
assertEquals(true, tabuAcceptor.isAccepted(buildMoveScope(stepScope0, e3)));
assertEquals(true, tabuAcceptor.isAccepted(buildMoveScope(stepScope0, e4)));
assertEquals(true, tabuAcceptor.isAccepted(buildMoveScope(stepScope0, e2))); // repeated call
stepScope0.setStep(moveScope1.getMove());
tabuAcceptor.stepTaken(stepScope0);
LocalSearchStepScope stepScope1 = new LocalSearchStepScope(solverPhaseScope);
stepScope1.setStepIndex(1);
MoveScope moveScope2 = buildMoveScope(stepScope1, e2);
assertEquals(true, tabuAcceptor.isAccepted(buildMoveScope(stepScope1, e0)));
assertEquals(false, tabuAcceptor.isAccepted(buildMoveScope(stepScope1, e1)));
assertEquals(true, tabuAcceptor.isAccepted(moveScope2));
assertEquals(true, tabuAcceptor.isAccepted(buildMoveScope(stepScope1, e3)));
assertEquals(true, tabuAcceptor.isAccepted(buildMoveScope(stepScope1, e4)));
assertEquals(true, tabuAcceptor.isAccepted(buildMoveScope(stepScope1, e2))); // repeated call
stepScope1.setStep(moveScope2.getMove());
tabuAcceptor.stepTaken(stepScope1);
LocalSearchStepScope stepScope2 = new LocalSearchStepScope(solverPhaseScope);
stepScope2.setStepIndex(2);
MoveScope moveScope4 = buildMoveScope(stepScope1, e4);
assertEquals(true, tabuAcceptor.isAccepted(buildMoveScope(stepScope2, e0)));
assertEquals(false, tabuAcceptor.isAccepted(buildMoveScope(stepScope2, e1)));
assertEquals(false, tabuAcceptor.isAccepted(buildMoveScope(stepScope2, e2)));
assertEquals(true, tabuAcceptor.isAccepted(buildMoveScope(stepScope2, e3)));
assertEquals(true, tabuAcceptor.isAccepted(moveScope4));
assertEquals(false, tabuAcceptor.isAccepted(buildMoveScope(stepScope2, e2))); // repeated call
stepScope2.setStep(moveScope4.getMove());
tabuAcceptor.stepTaken(stepScope2);
LocalSearchStepScope stepScope3 = new LocalSearchStepScope(solverPhaseScope);
stepScope3.setStepIndex(3);
MoveScope moveScope3 = buildMoveScope(stepScope1, e3);
assertEquals(true, tabuAcceptor.isAccepted(buildMoveScope(stepScope3, e0)));
assertEquals(true, tabuAcceptor.isAccepted(buildMoveScope(stepScope3, e1)));
assertEquals(false, tabuAcceptor.isAccepted(buildMoveScope(stepScope3, e2)));
assertEquals(true, tabuAcceptor.isAccepted(moveScope3));
assertEquals(false, tabuAcceptor.isAccepted(buildMoveScope(stepScope3, e4)));
assertEquals(false, tabuAcceptor.isAccepted(buildMoveScope(stepScope3, e2))); // repeated call
stepScope3.setStep(moveScope3.getMove());
tabuAcceptor.stepTaken(stepScope3);
LocalSearchStepScope stepScope4 = new LocalSearchStepScope(solverPhaseScope);
stepScope4.setStepIndex(4);
MoveScope moveScope1Again = buildMoveScope(stepScope1, e1);
assertEquals(true, tabuAcceptor.isAccepted(buildMoveScope(stepScope4, e0)));
assertEquals(true, tabuAcceptor.isAccepted(moveScope1Again));
assertEquals(true, tabuAcceptor.isAccepted(buildMoveScope(stepScope4, e2)));
assertEquals(false, tabuAcceptor.isAccepted(buildMoveScope(stepScope4, e3)));
assertEquals(false, tabuAcceptor.isAccepted(buildMoveScope(stepScope4, e4)));
assertEquals(true, tabuAcceptor.isAccepted(buildMoveScope(stepScope4, e2))); // repeated call
stepScope4.setStep(moveScope1Again.getMove());
tabuAcceptor.stepTaken(stepScope4);
tabuAcceptor.phaseEnded(solverPhaseScope);
}