class TravelServiceImpl implements TravelService {

    @Override
    public Response getRouteByTripId(String tripId, HttpHeaders headers) {
        Route route = null;
        if (null != tripId && tripId.length() >= 2) {
            TripId tripId1 = new TripId(tripId);
            Trip trip = repository.findByTripId(tripId1);
            if (trip != null) {
                route = getRouteByRouteId(trip.getRouteId(), headers);
            }
        }
        if (route != null) {
            return new Response<>(1, success, route);
        } else {
            return new Response<>(0, noContent, null);
        }
    }

}