class CargoFactory {
    private final LocationRepository locationRepository;
    private final CargoRepository cargoRepository;

    public CargoFactory(LocationRepository locationRepository, CargoRepository cargoRepository) {
        this.locationRepository = locationRepository;
        this.cargoRepository = cargoRepository;
    }

    public Cargo createCargo(UnLocode originUnLoCode, UnLocode destinationUnLoCode, Instant arrivalDeadline) {<FILL_FUNCTION_BODY>}
}

        final TrackingId trackingId = cargoRepository.nextTrackingId();
        final Location origin = locationRepository.find(originUnLoCode);
        final Location destination = locationRepository.find(destinationUnLoCode);
        final RouteSpecification routeSpecification = new RouteSpecification(origin, destination, arrivalDeadline);

        return new Cargo(trackingId, routeSpecification);
    
<no_super_class>