TripsFieldSetMapper implements GtfsFiledSetMapper<Trip> { @Override public Trip mapFieldSet(FieldSet fieldSet) throws BindException { Trip result = new Trip(); result.setServiceId(fieldSet.readString("service_id")); result.setRouteId(fieldSet.readString("route_id")); result.setTripId(fieldSet.readString("trip_id")); return result; }  @Override Trip mapFieldSet(FieldSet fieldSet);  }
@Test public void testMapFieldSet() throws Exception { expect(fieldSetMock.readString("route_id")).andReturn("routes:IC106"); expect(fieldSetMock.readString("service_id")).andReturn("1"); expect(fieldSetMock.readString("trip_id")).andReturn("IC466"); replayAll(); Trip actual = mapper.mapFieldSet(fieldSetMock); Assert.assertNotNull(actual); verifyAll(); }