### Question:
DataSourceService extends BaseService { public Map<String, Object> queryDataSourceListPaging(User loginUser, String searchVal, Integer pageNo, Integer pageSize) { Map<String, Object> result = new HashMap<>(); IPage<DataSource> dataSourceList = null; Page<DataSource> dataSourcePage = new Page(pageNo, pageSize); if (isAdmin(loginUser)) { dataSourceList = dataSourceMapper.selectPaging(dataSourcePage, 0, searchVal); } else { dataSourceList = dataSourceMapper.selectPaging(dataSourcePage, loginUser.getId(), searchVal); } List<DataSource> dataSources = dataSourceList != null ? dataSourceList.getRecords() : new ArrayList<>(); handlePasswd(dataSources); PageInfo pageInfo = new PageInfo<Resource>(pageNo, pageSize); pageInfo.setTotalCount((int) (dataSourceList != null ? dataSourceList.getTotal() : 0L)); pageInfo.setLists(dataSources); result.put(Constants.DATA_LIST, pageInfo); putMsg(result, Status.SUCCESS); return result; }  Map<String, Object> createDataSource(User loginUser, String name, String desc, DbType type, String parameter); Map<String, Object> updateDataSource(int id, User loginUser, String name, String desc, DbType type, String parameter); Map<String, Object> queryDataSource(int id); Map<String, Object> queryDataSourceListPaging(User loginUser, String searchVal, Integer pageNo, Integer pageSize); Map<String, Object> queryDataSourceList(User loginUser, Integer type); Result verifyDataSourceName(String name); boolean checkConnection(DbType type, String parameter); boolean connectionTest(int id); String buildParameter(DbType type, String host,
                                 String port, String database, String principal, String userName,
                                 String password, DbConnectType connectType, String other); @Transactional(rollbackFor = RuntimeException.class) Result delete(User loginUser, int datasourceId); Map<String, Object> unauthDatasource(User loginUser, Integer userId); Map<String, Object> authedDatasource(User loginUser, Integer userId); static final String NAME; static final String NOTE; static final String TYPE; static final String HOST; static final String PORT; static final String PRINCIPAL; static final String DATABASE; static final String USER_NAME; static final String OTHER; }### Answer:
@Test public void queryDataSourceListPagingTest() { User loginUser = getAdminUser(); String searchVal = ""; int pageNo = 1; int pageSize = 10; Map<String, Object> success = dataSourceService.queryDataSourceListPaging(loginUser, searchVal, pageNo, pageSize); Assert.assertEquals(Status.SUCCESS, success.get(Constants.STATUS)); }