KeeperContainerServiceImpl extends AbstractConsoleService<KeepercontainerTblDao> implements KeeperContainerService { protected void update(KeepercontainerTbl keepercontainerTbl) { queryHandler.handleUpdate(new DalQuery<Integer>() { @Override public Integer doQuery() throws DalException { return dao.updateByPK(keepercontainerTbl, KeepercontainerTblEntity.UPDATESET_FULL); } }); }  @Override KeepercontainerTbl find(final long id); @Override List<KeepercontainerTbl> findAllByDcName(final String dcName); @Override List<KeepercontainerTbl> findAllActiveByDcName(String dcName); @Override List<KeepercontainerTbl> findKeeperCount(String dcName); @Override List<KeepercontainerTbl> findBestKeeperContainersByDcCluster(String dcName, String clusterName); @Override void addKeeperContainer(final KeeperContainerCreateInfo createInfo); @Override List<KeeperContainerCreateInfo> getDcAllKeeperContainers(String dc); @Override void updateKeeperContainer(KeeperContainerCreateInfo createInfo); @Override List<KeeperContainerInfoModel> findAllInfos();  }
@Test public void testUpdate() { List<KeeperContainerCreateInfo> keepers = keeperContainerService.getDcAllKeeperContainers(dcNames[0]); KeeperContainerCreateInfo sample = null; for(KeeperContainerCreateInfo info : keepers) { if(info.getKeepercontainerOrgId() != 0L) { sample = info; break; } } if(sample != null) { logger.info("[sample] {}", sample); sample.setKeepercontainerOrgId(0L); keeperContainerService.updateKeeperContainer(sample); KeepercontainerTbl ktl = keeperContainerService.findByIpPort(sample.getKeepercontainerIp(), sample.getKeepercontainerPort()); Assert.assertNotNull(ktl); Assert.assertEquals(0L, ktl.getKeepercontainerOrgId()); logger.info("[ktl] {}", ktl); } }