PageApiController { @RequestMapping(value = "page/pageString/{page}-{pageSize}", method = RequestMethod.GET) @Account(false) public PageResult<String> pageString(@PathVariable int page, @PathVariable int pageSize) throws Exception { PageResult<String> pageResult = PageResult.createPage(10, page, pageSize); pageResult.setData(Collections.singletonList(RandomStringUtils.randomAlphanumeric(10))); return pageResult; }  @RequestMapping(value = "page/page/{page}-{pageSize}", method = RequestMethod.GET) @Account(false) PageResult<TestObject> page(@PathVariable int page, @PathVariable int pageSize); @RequestMapping(value = "page/pageString/{page}-{pageSize}", method = RequestMethod.GET) @Account(false) PageResult<String> pageString(@PathVariable int page, @PathVariable int pageSize);  }
@Test public void pageString() throws Exception { PageResult<String> page = apiManager.pageApi.pageString(PAGE, PAGE_SIZE); Assert.assertNotNull(page); Assert.assertNotNull(page.getData()); Assert.assertEquals(page.getData().size(),1); Assert.assertEquals(page.getPage(),PAGE); Assert.assertEquals(page.getPageSize(),PAGE_SIZE); }