test_class.file: optaweb-vehicle-routing-backend/src/test/java/org/optaweb/vehiclerouting/plugin/planner/domain/SolutionFactoryTest.java
test_class.identifier: SolutionFactoryTest
test_case.body: @Test
      void solution_created_from_vehicles_depot_and_visits_should_be_consistent() {
          PlanningVehicle vehicle = new PlanningVehicle();
  
          PlanningLocation depotLocation = PlanningLocationFactory.testLocation(1);
          PlanningDepot depot = new PlanningDepot(depotLocation);
  
          PlanningVisit visit = PlanningVisitFactory.testVisit(2);
  
          VehicleRoutingSolution solutionWithDepot = SolutionFactory.solutionFromVisits(
                  singletonList(vehicle),
                  depot,
                  singletonList(visit));
          assertThat(solutionWithDepot.getVehicleList()).containsExactly(vehicle);
          assertThat(vehicle.getDepot()).isEqualTo(depot);
          assertThat(solutionWithDepot.getDepotList()).containsExactly(depot);
          assertThat(solutionWithDepot.getVisitList()).hasSize(1);
          assertThat(solutionWithDepot.getVisitList()).containsExactly(visit);
          assertThat(solutionWithDepot.getVisitList().get(0).getLocation()).isEqualTo(visit.getLocation());
  
          VehicleRoutingSolution solutionWithNoDepot = SolutionFactory.solutionFromVisits(
                  singletonList(vehicle),
                  null,
                  emptyList());
          assertThat(solutionWithNoDepot.getDepotList()).isEmpty();
      }
test_case.class_method_signature: SolutionFactoryTest.solution_created_from_vehicles_depot_and_visits_should_be_consistent()
test_case.full_signature: @Test void solution_created_from_vehicles_depot_and_visits_should_be_consistent()
test_case.identifier: solution_created_from_vehicles_depot_and_visits_should_be_consistent
test_case.invocations: testLocation testVisit solutionFromVisits singletonList singletonList containsExactly assertThat getVehicleList isEqualTo assertThat getDepot containsExactly assertThat getDepotList hasSize assertThat getVisitList containsExactly assertThat getVisitList isEqualTo assertThat getLocation get getVisitList getLocation solutionFromVisits singletonList emptyList isEmpty assertThat getDepotList
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void solution_created_from_vehicles_depot_and_visits_should_be_consistent()
focal_class.file: optaweb-vehicle-routing-backend/src/main/java/org/optaweb/vehiclerouting/plugin/planner/domain/SolutionFactory.java
focal_class.identifier: SolutionFactory
focal_class.class_method_signature: SolutionFactory.SolutionFactory()
focal_class.full_signature: private  SolutionFactory()
focal_class.identifier: SolutionFactory
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  SolutionFactory()
focal_class.class_method_signature: SolutionFactory.emptySolution()
focal_class.full_signature: public static VehicleRoutingSolution emptySolution()
focal_class.identifier: emptySolution
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: VehicleRoutingSolution
focal_class.signature: VehicleRoutingSolution emptySolution()
focal_class.class_method_signature: SolutionFactory.solutionFromVisits(
              List<PlanningVehicle> vehicles,
              PlanningDepot depot,
              List<PlanningVisit> visits)
focal_class.full_signature: public static VehicleRoutingSolution solutionFromVisits(
              List<PlanningVehicle> vehicles,
              PlanningDepot depot,
              List<PlanningVisit> visits)
focal_class.identifier: solutionFromVisits
focal_class.modifiers: public static
focal_class.parameters: (
              List<PlanningVehicle> vehicles,
              PlanningDepot depot,
              List<PlanningVisit> visits)
focal_class.return: VehicleRoutingSolution
focal_class.signature: VehicleRoutingSolution solutionFromVisits(
              List<PlanningVehicle> vehicles,
              PlanningDepot depot,
              List<PlanningVisit> visits)
focal_class.class_method_signature: SolutionFactory.moveAllVehiclesToDepot(List<PlanningVehicle> vehicles, PlanningDepot depot)
focal_class.full_signature: private static void moveAllVehiclesToDepot(List<PlanningVehicle> vehicles, PlanningDepot depot)
focal_class.identifier: moveAllVehiclesToDepot
focal_class.modifiers: private static
focal_class.parameters: (List<PlanningVehicle> vehicles, PlanningDepot depot)
focal_class.return: void
focal_class.signature: void moveAllVehiclesToDepot(List<PlanningVehicle> vehicles, PlanningDepot depot)
focal_method.body: public static VehicleRoutingSolution solutionFromVisits(
              List<PlanningVehicle> vehicles,
              PlanningDepot depot,
              List<PlanningVisit> visits) {
          VehicleRoutingSolution solution = new VehicleRoutingSolution();
          solution.setVehicleList(new ArrayList<>(vehicles));
          solution.setDepotList(new ArrayList<>(1));
          if (depot != null) {
              solution.getDepotList().add(depot);
              moveAllVehiclesToDepot(vehicles, depot);
          }
          solution.setVisitList(new ArrayList<>(visits));
          solution.setScore(HardSoftLongScore.ZERO);
          return solution;
      }
focal_method.class_method_signature: SolutionFactory.solutionFromVisits(
              List<PlanningVehicle> vehicles,
              PlanningDepot depot,
              List<PlanningVisit> visits)
focal_method.full_signature: public static VehicleRoutingSolution solutionFromVisits(
              List<PlanningVehicle> vehicles,
              PlanningDepot depot,
              List<PlanningVisit> visits)
focal_method.identifier: solutionFromVisits
focal_method.invocations: setVehicleList setDepotList add getDepotList moveAllVehiclesToDepot setVisitList setScore
focal_method.modifiers: public static
focal_method.parameters: (
              List<PlanningVehicle> vehicles,
              PlanningDepot depot,
              List<PlanningVisit> visits)
focal_method.return: VehicleRoutingSolution
focal_method.signature: VehicleRoutingSolution solutionFromVisits(
              List<PlanningVehicle> vehicles,
              PlanningDepot depot,
              List<PlanningVisit> visits)