ServerDao extends BaseDao { public int updateServer(Server server) throws SQLException { if (null == server || server.getId() == null) { return 0; } return this.getDasClient().update(server); }  Server getServerById(Long id); Long insertServer(Server server); int updateServer(Server server); int deleteServer(Server server); int deleteServerAndServerConfigByServerId(Long serverId); boolean isNotExistByIpAndPort(Server server); int deleteServerByServerGroupId(Long serverGroupId); int changeServerGroup(long serverId, long serverGroupId); List<Server> getServersByServerGroupId(Long serverGroupId); Long getServerTotalCount(Paging<Server> paging); List<ServerView> findServerPageList(Paging<Server> paging);  }
@Test public void updateServer() throws Exception { Long id = 4L; server.setId(id); server.setComment("sasasas"); int _id = serverDao.updateServer(server); System.out.println("updateServer :-------> " + _id); Assert.assertTrue(_id == 1); }