test_class.declarator: publisher
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ApplicationEventPublisher publisher;
test_class.type: ApplicationEventPublisher
test_class.var_name: publisher
test_class.declarator: routeChangedEventPublisher
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private RouteChangedEventPublisher routeChangedEventPublisher;
test_class.type: RouteChangedEventPublisher
test_class.var_name: routeChangedEventPublisher
test_class.file: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/RouteChangedEventPublisherTest.java
test_class.identifier: RouteChangedEventPublisherTest
test_case.body: @Test
      void vehicle_without_a_depot_is_illegal_if_depot_exists() {
          PlanningDepot depot = new PlanningDepot(testLocation(1));
          PlanningVehicle vehicle = testVehicle(1);
          VehicleRoutingSolution solution = solutionFromVisits(singletonList(vehicle), depot, emptyList());
          vehicle.setDepot(null);
          assertThatIllegalArgumentException()
                  .isThrownBy(() -> RouteChangedEventPublisher.solutionToEvent(solution, this))
                  .withMessageContaining("Vehicle");
      }
test_case.class_method_signature: RouteChangedEventPublisherTest.vehicle_without_a_depot_is_illegal_if_depot_exists()
test_case.full_signature: @Test void vehicle_without_a_depot_is_illegal_if_depot_exists()
test_case.identifier: vehicle_without_a_depot_is_illegal_if_depot_exists
test_case.invocations: testLocation testVehicle solutionFromVisits singletonList emptyList setDepot withMessageContaining isThrownBy assertThatIllegalArgumentException solutionToEvent
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void vehicle_without_a_depot_is_illegal_if_depot_exists()
focal_class.declarator: logger = LoggerFactory.getLogger(RouteChangedEventPublisher.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(RouteChangedEventPublisher.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: eventPublisher
focal_class.modifier: private final
focal_class.original_string: private final ApplicationEventPublisher eventPublisher;
focal_class.type: ApplicationEventPublisher
focal_class.var_name: eventPublisher
focal_class.file: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/RouteChangedEventPublisher.java
focal_class.identifier: RouteChangedEventPublisher
focal_class.class_method_signature: RouteChangedEventPublisher.RouteChangedEventPublisher(ApplicationEventPublisher eventPublisher)
focal_class.full_signature: @Autowired  RouteChangedEventPublisher(ApplicationEventPublisher eventPublisher)
focal_class.identifier: RouteChangedEventPublisher
focal_class.modifiers: @Autowired
focal_class.parameters: (ApplicationEventPublisher eventPublisher)
focal_class.signature:  RouteChangedEventPublisher(ApplicationEventPublisher eventPublisher)
focal_class.class_method_signature: RouteChangedEventPublisher.publishSolution(VehicleRoutingSolution solution)
focal_class.full_signature:  void publishSolution(VehicleRoutingSolution solution)
focal_class.identifier: publishSolution
focal_class.parameters: (VehicleRoutingSolution solution)
focal_class.return: void
focal_class.signature: void publishSolution(VehicleRoutingSolution solution)
focal_class.class_method_signature: RouteChangedEventPublisher.solutionToEvent(VehicleRoutingSolution solution, Object source)
focal_class.full_signature: static RouteChangedEvent solutionToEvent(VehicleRoutingSolution solution, Object source)
focal_class.identifier: solutionToEvent
focal_class.modifiers: static
focal_class.parameters: (VehicleRoutingSolution solution, Object source)
focal_class.return: RouteChangedEvent
focal_class.signature: RouteChangedEvent solutionToEvent(VehicleRoutingSolution solution, Object source)
focal_class.class_method_signature: RouteChangedEventPublisher.visitIds(VehicleRoutingSolution solution)
focal_class.full_signature: private static List<Long> visitIds(VehicleRoutingSolution solution)
focal_class.identifier: visitIds
focal_class.modifiers: private static
focal_class.parameters: (VehicleRoutingSolution solution)
focal_class.return: List<Long>
focal_class.signature: List<Long> visitIds(VehicleRoutingSolution solution)
focal_class.class_method_signature: RouteChangedEventPublisher.routes(VehicleRoutingSolution solution)
focal_class.full_signature: private static List<ShallowRoute> routes(VehicleRoutingSolution solution)
focal_class.identifier: routes
focal_class.modifiers: private static
focal_class.parameters: (VehicleRoutingSolution solution)
focal_class.return: List<ShallowRoute>
focal_class.signature: List<ShallowRoute> routes(VehicleRoutingSolution solution)
focal_class.class_method_signature: RouteChangedEventPublisher.vehicleIds(VehicleRoutingSolution solution)
focal_class.full_signature: private static List<Long> vehicleIds(VehicleRoutingSolution solution)
focal_class.identifier: vehicleIds
focal_class.modifiers: private static
focal_class.parameters: (VehicleRoutingSolution solution)
focal_class.return: List<Long>
focal_class.signature: List<Long> vehicleIds(VehicleRoutingSolution solution)
focal_class.class_method_signature: RouteChangedEventPublisher.depotId(VehicleRoutingSolution solution)
focal_class.full_signature: private static Long depotId(VehicleRoutingSolution solution)
focal_class.identifier: depotId
focal_class.modifiers: private static
focal_class.parameters: (VehicleRoutingSolution solution)
focal_class.return: Long
focal_class.signature: Long depotId(VehicleRoutingSolution solution)
focal_method.body: static RouteChangedEvent solutionToEvent(VehicleRoutingSolution solution, Object source) {
          List<ShallowRoute> routes = routes(solution);
          return new RouteChangedEvent(
                  source,
                  // Turn negative soft score into a positive amount of time.
                  Distance.ofMillis(-solution.getScore().getSoftScore()),
                  vehicleIds(solution),
                  depotId(solution),
                  visitIds(solution),
                  routes);
      }
focal_method.class_method_signature: RouteChangedEventPublisher.solutionToEvent(VehicleRoutingSolution solution, Object source)
focal_method.full_signature: static RouteChangedEvent solutionToEvent(VehicleRoutingSolution solution, Object source)
focal_method.identifier: solutionToEvent
focal_method.invocations: routes ofMillis getSoftScore getScore vehicleIds depotId visitIds
focal_method.modifiers: static
focal_method.parameters: (VehicleRoutingSolution solution, Object source)
focal_method.return: RouteChangedEvent
focal_method.signature: RouteChangedEvent solutionToEvent(VehicleRoutingSolution solution, Object source)