FindStopTimesProcessor extends AbstractGtfsDataProcessor<Trip, Trip> implements InitializingBean { @Override public Trip process(Trip item) throws Exception { item.setStopTimes(findStopTimes(item.getTripId())); LOGGER.debug("result", item); return item; }  @Override void afterPropertiesSet(); @Override Trip process(Trip item); void setStopTimesReader(ItemStreamReader<StopTime> stopTimesReader);  }
@Test public void testProcess() throws Exception { expect(reader.read()).andReturn(new StopTime()); expect(reader.read()).andReturn(null); replayAll(); Trip trip = processor.process(new Trip()); assertNotNull(trip); assertTrue(trip.getStopTimes().isEmpty()); }