test_class.declarator: scoreDirector
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ScoreDirector<VehicleRoutingSolution> scoreDirector;
test_class.type: ScoreDirector<VehicleRoutingSolution>
test_class.var_name: scoreDirector
test_class.file: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/change/AddVisitTest.java
test_class.identifier: AddVisitTest
test_case.body: @Test
      void add_visit_should_add_location_and_create_visit() {
          VehicleRoutingSolution solution = SolutionFactory.emptySolution();
          when(scoreDirector.getWorkingSolution()).thenReturn(solution);
  
          PlanningVisit visit = PlanningVisitFactory.testVisit(1);
          AddVisit addVisit = new AddVisit(visit);
          addVisit.doChange(scoreDirector);
  
          verify(scoreDirector).beforeEntityAdded(visit);
          verify(scoreDirector).afterEntityAdded(visit);
          assertThat(solution.getVisitList()).containsExactly(visit);
  
          verify(scoreDirector).triggerVariableListeners();
      }
test_case.class_method_signature: AddVisitTest.add_visit_should_add_location_and_create_visit()
test_case.full_signature: @Test void add_visit_should_add_location_and_create_visit()
test_case.identifier: add_visit_should_add_location_and_create_visit
test_case.invocations: emptySolution thenReturn when getWorkingSolution testVisit doChange beforeEntityAdded verify afterEntityAdded verify containsExactly assertThat getVisitList triggerVariableListeners verify
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void add_visit_should_add_location_and_create_visit()
focal_class.declarator: visit
focal_class.modifier: private final
focal_class.original_string: private final PlanningVisit visit;
focal_class.type: PlanningVisit
focal_class.var_name: visit
focal_class.file: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/AddVisit.java
focal_class.identifier: AddVisit
focal_class.interfaces: implements ProblemFactChange<VehicleRoutingSolution>
focal_class.class_method_signature: AddVisit.AddVisit(PlanningVisit visit)
focal_class.full_signature: public  AddVisit(PlanningVisit visit)
focal_class.identifier: AddVisit
focal_class.modifiers: public
focal_class.parameters: (PlanningVisit visit)
focal_class.signature:  AddVisit(PlanningVisit visit)
focal_class.class_method_signature: AddVisit.doChange(ScoreDirector<VehicleRoutingSolution> scoreDirector)
focal_class.full_signature: @Override public void doChange(ScoreDirector<VehicleRoutingSolution> scoreDirector)
focal_class.identifier: doChange
focal_class.modifiers: @Override public
focal_class.parameters: (ScoreDirector<VehicleRoutingSolution> scoreDirector)
focal_class.return: void
focal_class.signature: void doChange(ScoreDirector<VehicleRoutingSolution> scoreDirector)
focal_method.body: @Override
      public void doChange(ScoreDirector<VehicleRoutingSolution> scoreDirector) {
          scoreDirector.beforeEntityAdded(visit);
          scoreDirector.getWorkingSolution().getVisitList().add(visit);
          scoreDirector.afterEntityAdded(visit);
  
          scoreDirector.triggerVariableListeners();
      }
focal_method.class_method_signature: AddVisit.doChange(ScoreDirector<VehicleRoutingSolution> scoreDirector)
focal_method.full_signature: @Override public void doChange(ScoreDirector<VehicleRoutingSolution> scoreDirector)
focal_method.identifier: doChange
focal_method.invocations: beforeEntityAdded add getVisitList getWorkingSolution afterEntityAdded triggerVariableListeners
focal_method.modifiers: @Override public
focal_method.parameters: (ScoreDirector<VehicleRoutingSolution> scoreDirector)
focal_method.return: void
focal_method.signature: void doChange(ScoreDirector<VehicleRoutingSolution> scoreDirector)