@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);
}