GtfsRealtimeEntitySource { public Id getTripId(String tripId) { TripEntry trip = getTrip(tripId); if (trip != null) return ServiceAlertLibrary.id(trip.getId()); _log.warn("trip not found with id \"{}\"", tripId); AgencyAndId id = new AgencyAndId(_agencyIds.get(0), tripId); return ServiceAlertLibrary.id(id); }  void setTransitGraphDao(TransitGraphDao transitGraphDao); void setConsolidatedStopService(ConsolidatedStopsService service); void setAgencyIds(List<String> agencyIds); Id getRouteId(String routeId); Id getTripId(String tripId); TripEntry getTrip(String tripId); Id getStopId(String stopId);  }
@Test public void testGetTripId() { TripEntryImpl trip = new TripEntryImpl(); trip.setId(new AgencyAndId("2", "T10")); Mockito.when(_dao.getTripEntryForId(trip.getId())).thenReturn(trip); Id tripId = _source.getTripId("T10"); assertEquals("2", tripId.getAgencyId()); assertEquals("T10", tripId.getId()); tripId = _source.getTripId("T11"); assertEquals("1", tripId.getAgencyId()); assertEquals("T11", tripId.getId()); }