RoutesFieldSetMapper implements GtfsFiledSetMapper<Route> { @Override public Route mapFieldSet(FieldSet fieldSet) throws BindException { Route result = new Route(); result.setRouteId(fieldSet.readString("route_id")); result.setRouteShortName(fieldSet.readString("route_short_name")); result.setRouteLongName(fieldSet.readString("route_long_name")); return result; }  @Override Route mapFieldSet(FieldSet fieldSet);  }
@Test public void testMapFieldSet() throws Exception { expect(fieldSetMock.readString("route_id")).andReturn("route:IC466"); expect(fieldSetMock.readString("route_short_name")).andReturn("IC466"); expect(fieldSetMock.readString("route_long_name")).andReturn("Liège-Guillemins - Bruxelles Central"); replayAll(); Route actual = mapper.mapFieldSet(fieldSetMock); Assert.assertNotNull(actual); verifyAll(); }