class DemoService {

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

    @Autowired public  DemoService(
            RoutingProblemList routingProblems,
            LocationService locationService,
            LocationRepository locationRepository,
            VehicleService vehicleService,
            VehicleRepository vehicleRepository,
            DataSetMarshaller dataSetMarshaller);

}