RouteDao extends AbstractXpipeConsoleDAO { public void update(RouteTbl routeTbl) { queryHandler.handleUpdate(new DalQuery<Integer>() { @Override public Integer doQuery() throws DalException { return dao.updateByPK(routeTbl, RouteTblEntity.UPDATESET_main); } }); }  List<RouteTbl> getAllAvailableRoutes(); void insert(RouteTbl routeTbl); void delete(long id); List<RouteTbl> getAllRoutes(); void update(RouteTbl routeTbl);  }
@Test public void testUpdate() { proto1.setTag(Route.TAG_CONSOLE); routeDao.update(proto1); List<RouteTbl> routeTbls = routeDao.getAllRoutes(); RouteTbl proto = null; for(RouteTbl route : routeTbls) { logger.info("[route] {}", route); if(route.getId() == proto1.getId()) { proto = route; break; } } Assert.assertNotNull(proto); Assert.assertEquals(Route.TAG_CONSOLE, proto.getTag()); }