BisonFuteApi { public List<FreewaySegmentFluency> getBisonFuteTrafficStatus() throws ApiReseauException { List<FreewaySegmentFluency> freewaySegFluency = new ArrayList<FreewaySegmentFluency>(); List<BasicDataValue> result = appelApi(getUrl(CMD_SEGMENT_FLUENCY)); for(BasicDataValue r: result) { if(r instanceof FreewaySegmentFluency) { freewaySegFluency.add((FreewaySegmentFluency) r); } } return freewaySegFluency; } BisonFuteApi(); List<FreewaySegmentFluency> getBisonFuteTrafficStatus();  }
@Test public void testGetBisonFuteTrafficStatus() throws ApiReseauException { api.setConnecteur(new FileConnector("/TraficStatus.xml")); List<FreewaySegmentFluency> res = api.getBisonFuteTrafficStatus(); assertNotNull(res); assertEquals(44, res.size()); assertTrue(res.get(0) instanceof FreewaySegmentFluency); assertNotNull(((FreewaySegmentFluency) res.get(0)).getTime()); assertEquals(TrafficStatus.FREE_FlOW, ((FreewaySegmentFluency) res.get(0)).getTrafficStatus()); assertEquals("MWL44.31", ((FreewaySegmentFluency) res.get(0)).getLocationId()); }