test_class.file: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/websocket/PortableRoutingPlanFactoryTest.java
test_class.identifier: PortableRoutingPlanFactoryTest
test_case.body: @Test
      void portable_routing_plan_empty() {
          PortableRoutingPlan portablePlan = PortableRoutingPlanFactory.fromRoutingPlan(RoutingPlan.empty());
          assertThat(portablePlan.getDistance()).isEqualTo(PortableDistance.fromDistance(Distance.ZERO));
          assertThat(portablePlan.getVehicles()).isEmpty();
          assertThat(portablePlan.getDepot()).isNull();
          assertThat(portablePlan.getRoutes()).isEmpty();
      }
test_case.class_method_signature: PortableRoutingPlanFactoryTest.portable_routing_plan_empty()
test_case.full_signature: @Test void portable_routing_plan_empty()
test_case.identifier: portable_routing_plan_empty
test_case.invocations: fromRoutingPlan empty isEqualTo assertThat getDistance fromDistance isEmpty assertThat getVehicles isNull assertThat getDepot isEmpty assertThat getRoutes
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void portable_routing_plan_empty()
focal_class.file: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/websocket/PortableRoutingPlanFactory.java
focal_class.identifier: PortableRoutingPlanFactory
focal_class.class_method_signature: PortableRoutingPlanFactory.PortableRoutingPlanFactory()
focal_class.full_signature: private  PortableRoutingPlanFactory()
focal_class.identifier: PortableRoutingPlanFactory
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  PortableRoutingPlanFactory()
focal_class.class_method_signature: PortableRoutingPlanFactory.fromRoutingPlan(RoutingPlan routingPlan)
focal_class.full_signature: static PortableRoutingPlan fromRoutingPlan(RoutingPlan routingPlan)
focal_class.identifier: fromRoutingPlan
focal_class.modifiers: static
focal_class.parameters: (RoutingPlan routingPlan)
focal_class.return: PortableRoutingPlan
focal_class.signature: PortableRoutingPlan fromRoutingPlan(RoutingPlan routingPlan)
focal_class.class_method_signature: PortableRoutingPlanFactory.portableTrack(List<List<Coordinates>> track)
focal_class.full_signature: private static List<List<PortableCoordinates>> portableTrack(List<List<Coordinates>> track)
focal_class.identifier: portableTrack
focal_class.modifiers: private static
focal_class.parameters: (List<List<Coordinates>> track)
focal_class.return: List<List<PortableCoordinates>>
focal_class.signature: List<List<PortableCoordinates>> portableTrack(List<List<Coordinates>> track)
focal_class.class_method_signature: PortableRoutingPlanFactory.portableVisits(List<Location> visits)
focal_class.full_signature: private static List<PortableLocation> portableVisits(List<Location> visits)
focal_class.identifier: portableVisits
focal_class.modifiers: private static
focal_class.parameters: (List<Location> visits)
focal_class.return: List<PortableLocation>
focal_class.signature: List<PortableLocation> portableVisits(List<Location> visits)
focal_class.class_method_signature: PortableRoutingPlanFactory.portableVehicles(List<Vehicle> vehicles)
focal_class.full_signature: private static List<PortableVehicle> portableVehicles(List<Vehicle> vehicles)
focal_class.identifier: portableVehicles
focal_class.modifiers: private static
focal_class.parameters: (List<Vehicle> vehicles)
focal_class.return: List<PortableVehicle>
focal_class.signature: List<PortableVehicle> portableVehicles(List<Vehicle> vehicles)
focal_method.body: static PortableRoutingPlan fromRoutingPlan(RoutingPlan routingPlan) {
          PortableDistance distance = PortableDistance.fromDistance(routingPlan.distance());
          List<PortableVehicle> vehicles = portableVehicles(routingPlan.vehicles());
          PortableLocation depot = routingPlan.depot().map(PortableLocation::fromLocation).orElse(null);
          List<PortableLocation> visits = portableVisits(routingPlan.visits());
          List<PortableRoute> routes = routingPlan.routes().stream()
                  .map(routeWithTrack -> new PortableRoute(
                          PortableVehicle.fromVehicle(routeWithTrack.vehicle()),
                          depot,
                          portableVisits(routeWithTrack.visits()),
                          portableTrack(routeWithTrack.track())))
                  .collect(toList());
          return new PortableRoutingPlan(distance, vehicles, depot, visits, routes);
      }
focal_method.class_method_signature: PortableRoutingPlanFactory.fromRoutingPlan(RoutingPlan routingPlan)
focal_method.full_signature: static PortableRoutingPlan fromRoutingPlan(RoutingPlan routingPlan)
focal_method.identifier: fromRoutingPlan
focal_method.invocations: fromDistance distance portableVehicles vehicles orElse map depot portableVisits visits collect map stream routes fromVehicle vehicle portableVisits visits portableTrack track toList
focal_method.modifiers: static
focal_method.parameters: (RoutingPlan routingPlan)
focal_method.return: PortableRoutingPlan
focal_method.signature: PortableRoutingPlan fromRoutingPlan(RoutingPlan routingPlan)