GtfsRelationalDaoImpl extends GtfsDaoImpl implements
    GtfsMutableRelationalDao { @Override public List<Trip> getTripsForBlockId(AgencyAndId blockId) { if (_tripsByBlockId == null) { _tripsByBlockId = new HashMap<AgencyAndId, List<Trip>>(); for (Trip trip : getAllTrips()) { if (trip.getBlockId() != null) { AgencyAndId bid = new AgencyAndId(trip.getId().getAgencyId(), trip.getBlockId()); List<Trip> trips = _tripsByBlockId.get(bid); if (trips == null) { trips = new ArrayList<Trip>(); _tripsByBlockId.put(bid, trips); } trips.add(trip); } } } return list(_tripsByBlockId.get(blockId)); }  void clearAllCaches(); @Override List<String> getTripAgencyIdsReferencingServiceId(AgencyAndId serviceId); @Override List<Route> getRoutesForAgency(Agency agency); @Override List<Stop> getStopsForStation(Stop station); @Override List<AgencyAndId> getAllShapeIds(); @Override List<ShapePoint> getShapePointsForShapeId(AgencyAndId shapeId); @Override List<StopTime> getStopTimesForTrip(Trip trip); @Override List<StopTime> getStopTimesForStop(Stop stop); @Override List<Trip> getTripsForRoute(Route route); @Override List<Trip> getTripsForShapeId(AgencyAndId shapeId); @Override List<Trip> getTripsForServiceId(AgencyAndId serviceId); @Override List<Trip> getTripsForBlockId(AgencyAndId blockId); @Override List<Frequency> getFrequenciesForTrip(Trip trip); @Override List<AgencyAndId> getAllServiceIds(); @Override List<ServiceCalendarDate> getCalendarDatesForServiceId(
      AgencyAndId serviceId); @Override ServiceCalendar getCalendarForServiceId(AgencyAndId serviceId); @Override List<FareRule> getFareRulesForFareAttribute(FareAttribute fareAttribute); @Override List<Ridership> getRidershipForTrip(AgencyAndId tripId);  }
@Test public void testTestAgency() throws IOException { String agencyId = "agency"; GtfsRelationalDaoImpl dao = new GtfsRelationalDaoImpl(); GtfsTestData.readGtfs(dao, GtfsTestData.getTestAgencyGtfs(), agencyId); List<Trip> trips = dao.getTripsForBlockId(new AgencyAndId(agencyId, "block.1")); assertEquals(2, trips.size()); }