DatabaseSetEntryService { public ListResult<DatabaseSetEntryView> findDbSetEntryPageList(Paging<DatabaseSetEntry> paging) throws SQLException { Long count = dataBaseSetEntryDao.getDbSetEntryTotalCount(paging); return PagerUtil.find(count, paging.getPage(), paging.getPageSize(), () -> { List<DatabaseSetEntryView> list = dataBaseSetEntryDao.findDbSetEntryPageList(paging); if (CollectionUtils.isEmpty(list)) { return Collections.emptyList(); } return list; }); }  ListResult<DatabaseSetEntryView> findDbSetEntryPageList(Paging<DatabaseSetEntry> paging); boolean isNotExistByName(DatabaseSetEntry databasesetentry); boolean insertDatabaseSetEntry(DatabaseSetEntry databasesetentry); ServiceResult<String> addDatabaseSetEntryList(LoginUser user, List<DatabaseSetEntry> dBList); List<String> getNamesByEntryIds(List<Integer> dbset_ids); ServiceResult<String> addDataCenterEntryList(LoginUser user, List<DatabaseSetEntry> dBList); ServiceResult<String> updateDataCenter(LoginUser user, DatabaseSetEntry newDbSetEntry); ServiceResult<String> deleteDataCenter(LoginUser user, DatabaseSetEntry dbsetEntry); ServiceResult<String> syncDbsetEntry(LoginUser user, DatabaseSetEntry dbsetEntry); ConfigCkeckResult<List<ConfigDataResponse>> getCheckData(LoginUser user, DatabaseSetEntry dbsetEntry); ServiceResult getDbSetEntryButton(LoginUser user);  }
@Test public void findDbSetEntryPageListTest() throws SQLException { ListResult<DatabaseSetEntryView> listResult = new ListResult<>(); List<DatabaseSetEntryView> list = Lists.newArrayList(DatabaseSetEntryView.builder().id(1).dbName("tom").build()); listResult.setList(list); Paging<DatabaseSetEntry> paging = new Paging<>(); paging.setData(new DatabaseSetEntry()); Assert.assertTrue(databaseSetEntryService.findDbSetEntryPageList(paging).getList().size() == 1); }