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/AddVehicleTest.java
test_class.identifier: AddVehicleTest
test_case.body: @Test
      void add_vehicle_should_add_vehicle() {
          VehicleRoutingSolution solution = SolutionFactory.emptySolution();
          when(scoreDirector.getWorkingSolution()).thenReturn(solution);
  
          PlanningVehicle vehicle = PlanningVehicleFactory.testVehicle(1);
          AddVehicle addVehicle = new AddVehicle(vehicle);
          addVehicle.doChange(scoreDirector);
  
          assertThat(solution.getVehicleList()).containsExactly(vehicle);
  
          verify(scoreDirector).beforeProblemFactAdded(vehicle);
          verify(scoreDirector).afterProblemFactAdded(vehicle);
          verify(scoreDirector).triggerVariableListeners();
      }
test_case.class_method_signature: AddVehicleTest.add_vehicle_should_add_vehicle()
test_case.full_signature: @Test void add_vehicle_should_add_vehicle()
test_case.identifier: add_vehicle_should_add_vehicle
test_case.invocations: emptySolution thenReturn when getWorkingSolution testVehicle doChange containsExactly assertThat getVehicleList beforeProblemFactAdded verify afterProblemFactAdded verify triggerVariableListeners verify
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void add_vehicle_should_add_vehicle()
focal_class.declarator: vehicle
focal_class.modifier: private final
focal_class.original_string: private final PlanningVehicle vehicle;
focal_class.type: PlanningVehicle
focal_class.var_name: vehicle
focal_class.file: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/change/AddVehicle.java
focal_class.identifier: AddVehicle
focal_class.interfaces: implements ProblemFactChange<VehicleRoutingSolution>
focal_class.class_method_signature: AddVehicle.AddVehicle(PlanningVehicle vehicle)
focal_class.full_signature: public  AddVehicle(PlanningVehicle vehicle)
focal_class.identifier: AddVehicle
focal_class.modifiers: public
focal_class.parameters: (PlanningVehicle vehicle)
focal_class.signature:  AddVehicle(PlanningVehicle vehicle)
focal_class.class_method_signature: AddVehicle.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.beforeProblemFactAdded(vehicle);
          scoreDirector.getWorkingSolution().getVehicleList().add(vehicle);
          scoreDirector.afterProblemFactAdded(vehicle);
  
          scoreDirector.triggerVariableListeners();
      }
focal_method.class_method_signature: AddVehicle.doChange(ScoreDirector<VehicleRoutingSolution> scoreDirector)
focal_method.full_signature: @Override public void doChange(ScoreDirector<VehicleRoutingSolution> scoreDirector)
focal_method.identifier: doChange
focal_method.invocations: beforeProblemFactAdded add getVehicleList getWorkingSolution afterProblemFactAdded triggerVariableListeners
focal_method.modifiers: @Override public
focal_method.parameters: (ScoreDirector<VehicleRoutingSolution> scoreDirector)
focal_method.return: void
focal_method.signature: void doChange(ScoreDirector<VehicleRoutingSolution> scoreDirector)