@Test
void fail_fast_if_working_solution_visit_list_does_not_contain_working_visit() {

    VehicleRoutingSolution solution = SolutionFactory.emptySolution();
    long removedId = 111L;
    PlanningVisit removedVisit = testVisit(removedId);
    long wrongId = 222L;
    PlanningVisit wrongVisit = testVisit(wrongId);
    wrongVisit.setPreviousStandstill(testVisit(10));
    removedVisit.setNextVisit(wrongVisit);
    solution.getVisitList().add(wrongVisit);
    when(scoreDirector.getWorkingSolution()).thenReturn(solution);
    when(scoreDirector.lookUpWorkingObject(removedVisit)).thenReturn(removedVisit);
    // do change
    RemoveVisit removeVisit = new RemoveVisit(removedVisit);
    assertThatIllegalStateException()
            .isThrownBy(() -> removeVisit.doChange(scoreDirector))
            .withMessageMatching(".*List .*" + wrongId + ".* doesn't contain the working.*" + removedId + ".*");
}