test_class.declarator: routingProblems
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private RoutingProblemList routingProblems;
test_class.type: RoutingProblemList
test_class.var_name: routingProblems
test_class.declarator: locationService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private LocationService locationService;
test_class.type: LocationService
test_class.var_name: locationService
test_class.declarator: locationRepository
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private LocationRepository locationRepository;
test_class.type: LocationRepository
test_class.var_name: locationRepository
test_class.declarator: vehicleService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private VehicleService vehicleService;
test_class.type: VehicleService
test_class.var_name: vehicleService
test_class.declarator: vehicleRepository
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private VehicleRepository vehicleRepository;
test_class.type: VehicleRepository
test_class.var_name: vehicleRepository
test_class.declarator: dataSetMarshaller
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private DataSetMarshaller dataSetMarshaller;
test_class.type: DataSetMarshaller
test_class.var_name: dataSetMarshaller
test_class.declarator: demoService
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private DemoService demoService;
test_class.type: DemoService
test_class.var_name: demoService
test_class.declarator: routingProblemCaptor
test_class.modifier: @Captor
      private
test_class.original_string: @Captor
      private ArgumentCaptor<RoutingProblem> routingProblemCaptor;
test_class.type: ArgumentCaptor<RoutingProblem>
test_class.var_name: routingProblemCaptor
test_class.declarator: problemName = "Testing problem"
test_class.modifier: private final
test_class.original_string: private final String problemName = "Testing problem";
test_class.type: String
test_class.var_name: problemName
test_class.declarator: vehicles = Arrays.asList(
              VehicleFactory.vehicleData("v1", 10),
              VehicleFactory.vehicleData("v2", 10))
test_class.modifier: private final
test_class.original_string: private final List<VehicleData> vehicles = Arrays.asList(
              VehicleFactory.vehicleData("v1", 10),
              VehicleFactory.vehicleData("v2", 10));
test_class.type: List<VehicleData>
test_class.var_name: vehicles
test_class.declarator: depot = new Location(1, Coordinates.valueOf(1.0, 7), "Depot")
test_class.modifier: private final
test_class.original_string: private final Location depot = new Location(1, Coordinates.valueOf(1.0, 7), "Depot");
test_class.type: Location
test_class.var_name: depot
test_class.declarator: visits = Arrays.asList(new Location(2, Coordinates.valueOf(2.0, 9), "Visit"))
test_class.modifier: private final
test_class.original_string: private final List<Location> visits = Arrays.asList(new Location(2, Coordinates.valueOf(2.0, 9), "Visit"));
test_class.type: List<Location>
test_class.var_name: visits
test_class.declarator: routingProblem = new RoutingProblem(problemName, vehicles, depot, visits)
test_class.modifier: private final
test_class.original_string: private final RoutingProblem routingProblem = new RoutingProblem(problemName, vehicles, depot, visits);
test_class.type: RoutingProblem
test_class.var_name: routingProblem
test_class.file: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/service/demo/DemoServiceTest.java
test_class.identifier: DemoServiceTest
test_case.body: @Test
      void export_should_marshal_routing_plans_with_locations_and_vehicles_from_repository() {
          Location depot = new Location(0, Coordinates.valueOf(1.0, 2.0), "Depot");
          Location visit1 = new Location(1, Coordinates.valueOf(11.0, 22.0), "Visit 1");
          Location visit2 = new Location(2, Coordinates.valueOf(22.0, 33.0), "Visit 2");
          Vehicle vehicle1 = VehicleFactory.createVehicle(11, "Vehicle 1", 100);
          Vehicle vehicle2 = VehicleFactory.createVehicle(12, "Vehicle 2", 200);
          when(locationRepository.locations()).thenReturn(Arrays.asList(depot, visit1, visit2));
          when(vehicleRepository.vehicles()).thenReturn(Arrays.asList(vehicle1, vehicle2));
  
          demoService.exportDataSet();
  
          RoutingProblem routingProblem = verifyAndCaptureMarshalledProblem();
          assertThat(routingProblem.name()).isNotNull();
          assertThat(routingProblem.depot()).contains(depot);
          assertThat(routingProblem.visits()).containsExactly(visit1, visit2);
          assertThat(routingProblem.vehicles()).containsExactly(vehicle1, vehicle2);
      }
test_case.class_method_signature: DemoServiceTest.export_should_marshal_routing_plans_with_locations_and_vehicles_from_repository()
test_case.full_signature: @Test void export_should_marshal_routing_plans_with_locations_and_vehicles_from_repository()
test_case.identifier: export_should_marshal_routing_plans_with_locations_and_vehicles_from_repository
test_case.invocations: valueOf valueOf valueOf createVehicle createVehicle thenReturn when locations asList thenReturn when vehicles asList exportDataSet verifyAndCaptureMarshalledProblem isNotNull assertThat name contains assertThat depot containsExactly assertThat visits containsExactly assertThat vehicles
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void export_should_marshal_routing_plans_with_locations_and_vehicles_from_repository()
focal_class.declarator: MAX_TRIES = 10
focal_class.modifier: static final
focal_class.original_string: static final int MAX_TRIES = 10;
focal_class.type: int
focal_class.var_name: MAX_TRIES
focal_class.declarator: routingProblems
focal_class.modifier: private final
focal_class.original_string: private final RoutingProblemList routingProblems;
focal_class.type: RoutingProblemList
focal_class.var_name: routingProblems
focal_class.declarator: locationService
focal_class.modifier: private final
focal_class.original_string: private final LocationService locationService;
focal_class.type: LocationService
focal_class.var_name: locationService
focal_class.declarator: locationRepository
focal_class.modifier: private final
focal_class.original_string: private final LocationRepository locationRepository;
focal_class.type: LocationRepository
focal_class.var_name: locationRepository
focal_class.declarator: vehicleService
focal_class.modifier: private final
focal_class.original_string: private final VehicleService vehicleService;
focal_class.type: VehicleService
focal_class.var_name: vehicleService
focal_class.declarator: vehicleRepository
focal_class.modifier: private final
focal_class.original_string: private final VehicleRepository vehicleRepository;
focal_class.type: VehicleRepository
focal_class.var_name: vehicleRepository
focal_class.declarator: dataSetMarshaller
focal_class.modifier: private final
focal_class.original_string: private final DataSetMarshaller dataSetMarshaller;
focal_class.type: DataSetMarshaller
focal_class.var_name: dataSetMarshaller
focal_class.file: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/service/demo/DemoService.java
focal_class.identifier: DemoService
focal_class.class_method_signature: DemoService.DemoService(
              RoutingProblemList routingProblems,
              LocationService locationService,
              LocationRepository locationRepository,
              VehicleService vehicleService,
              VehicleRepository vehicleRepository,
              DataSetMarshaller dataSetMarshaller)
focal_class.full_signature: @Autowired public  DemoService(
              RoutingProblemList routingProblems,
              LocationService locationService,
              LocationRepository locationRepository,
              VehicleService vehicleService,
              VehicleRepository vehicleRepository,
              DataSetMarshaller dataSetMarshaller)
focal_class.identifier: DemoService
focal_class.modifiers: @Autowired public
focal_class.parameters: (
              RoutingProblemList routingProblems,
              LocationService locationService,
              LocationRepository locationRepository,
              VehicleService vehicleService,
              VehicleRepository vehicleRepository,
              DataSetMarshaller dataSetMarshaller)
focal_class.signature:  DemoService(
              RoutingProblemList routingProblems,
              LocationService locationService,
              LocationRepository locationRepository,
              VehicleService vehicleService,
              VehicleRepository vehicleRepository,
              DataSetMarshaller dataSetMarshaller)
focal_class.class_method_signature: DemoService.demos()
focal_class.full_signature: public Collection<RoutingProblem> demos()
focal_class.identifier: demos
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Collection<RoutingProblem>
focal_class.signature: Collection<RoutingProblem> demos()
focal_class.class_method_signature: DemoService.loadDemo(String name)
focal_class.full_signature: @Async public void loadDemo(String name)
focal_class.identifier: loadDemo
focal_class.modifiers: @Async public
focal_class.parameters: (String name)
focal_class.return: void
focal_class.signature: void loadDemo(String name)
focal_class.class_method_signature: DemoService.addWithRetry(Coordinates coordinates, String description)
focal_class.full_signature: private void addWithRetry(Coordinates coordinates, String description)
focal_class.identifier: addWithRetry
focal_class.modifiers: private
focal_class.parameters: (Coordinates coordinates, String description)
focal_class.return: void
focal_class.signature: void addWithRetry(Coordinates coordinates, String description)
focal_class.class_method_signature: DemoService.exportDataSet()
focal_class.full_signature: public String exportDataSet()
focal_class.identifier: exportDataSet
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String exportDataSet()
focal_method.body: public String exportDataSet() {
          // FIXME still relying on the fact that the first location in the repository is the depot
          List<Location> visits = new ArrayList<>(locationRepository.locations());
          Location depot = visits.isEmpty() ? null : visits.remove(0);
          List<Vehicle> vehicles = vehicleRepository.vehicles();
          return dataSetMarshaller.marshal(new RoutingProblem(
                  "Custom Vehicle Routing instance", vehicles, depot, visits));
      }
focal_method.class_method_signature: DemoService.exportDataSet()
focal_method.full_signature: public String exportDataSet()
focal_method.identifier: exportDataSet
focal_method.invocations: locations isEmpty remove vehicles marshal
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: String
focal_method.signature: String exportDataSet()