ServerService { public ServiceResult insertServer(Server server) throws SQLException { Long id = serverDao.insertServer(server); if (id > 0) { server.setId(id); return ServiceResult.success(); } return ServiceResult.fail(message.db_message_add_operation_failed); }  ValidatorChain validatePermision(LoginUser user, Errors errors); ListResult<ServerView> findServerPageList(Paging<Server> paging); ServiceResult insertServer(Server server); ServiceResult<String> deleteServer(Server server); ServiceResult<String> addDataCenter(LoginUser user, Server server); ServiceResult<String> updateDataCenter(LoginUser user, Server server); ServiceResult<String> deleteDataCenter(LoginUser user, Server server); ServiceResult<String> syncDataCenter(LoginUser user, Server server); List<ConfigDataResponse> getCheckData(LoginUser user, Server server);  }
@Test public void insertServerTest() throws SQLException { Server server = Server.builder().id(1L).build(); Assert.assertTrue(serverService.insertServer(server).getCode() == ServiceResult.SUCCESS); }