### Question:
UdfFuncService extends BaseService { public Map<String, Object> queryUdfFuncListPaging(User loginUser, String searchVal, Integer pageNo, Integer pageSize) { Map<String, Object> result = new HashMap<>(); PageInfo pageInfo = new PageInfo<Resource>(pageNo, pageSize); IPage<UdfFunc> udfFuncList = getUdfFuncsPage(loginUser, searchVal, pageSize, pageNo); pageInfo.setTotalCount((int)udfFuncList.getTotal()); pageInfo.setLists(udfFuncList.getRecords()); result.put(Constants.DATA_LIST, pageInfo); putMsg(result, Status.SUCCESS); return result; }  Result createUdfFunction(User loginUser,
                                    String funcName,
                                    String className,
                                    String argTypes,
                                    String database,
                                    String desc,
                                    UdfType type,
                                    int resourceId); Map<String, Object> queryUdfFuncDetail(int id); Map<String, Object> updateUdfFunc(int udfFuncId,
                                             String funcName,
                                             String className,
                                             String argTypes,
                                             String database,
                                             String desc,
                                             UdfType type,
                                             int resourceId); Map<String, Object> queryUdfFuncListPaging(User loginUser, String searchVal, Integer pageNo, Integer pageSize); Map<String, Object> queryResourceList(User loginUser, Integer type); @Transactional(rollbackFor = RuntimeException.class) Result delete(int id); Result verifyUdfFuncByName(String name);  }### Answer:
@Test public void testQueryUdfFuncListPaging(){ IPage<UdfFunc> page = new Page<>(1,10); page.setTotal(1L); page.setRecords(getList()); Mockito.when(udfFuncMapper.queryUdfFuncPaging(Mockito.any(Page.class), Mockito.eq(0),Mockito.eq("test"))).thenReturn(page); Map<String, Object> result = udfFuncService.queryUdfFuncListPaging(getLoginUser(),"test",1,10); logger.info(result.toString()); PageInfo pageInfo = (PageInfo) result.get(Constants.DATA_LIST); Assert.assertTrue(CollectionUtils.isNotEmpty(pageInfo.getLists())); }