RouteServiceImpl implements RouteService { @Override public void updateRoute(RouteModel model) { DcIdNameMapper mapper = new DcIdNameMapper.DefaultMapper(dcService); routeDao.update(model.toRouteTbl(mapper)); }  @Override List<RouteTbl> getActiveRouteTbls(); @Override List<RouteModel> getAllRoutes(); @Override List<RouteModel> getActiveRoutes(); @Override void updateRoute(RouteModel model); @Override void deleteRoute(long id); @Override void addRoute(RouteModel model); @Override boolean existsRouteBetweenDc(String activeDc, String backupDc);  }
@Test public void testUpdateRoute() { route1.setTag(Route.TAG_CONSOLE); service.updateRoute(route1); RouteModel route = null; for(RouteModel mode : service.getAllRoutes()) { if(mode.getId() == route1.getId()) { route = mode; break; } } Assert.assertEquals(Route.TAG_CONSOLE, route.getTag()); }