@GetMapping("/findPageByQuery")
    public ShenyuAdminResult listByPage(final String apiId, final String host, final String url,
                                        final String pathVariable, final String header,
                                        @RequestParam @NotNull(message = "currentPage not null") final Integer currentPage,
                                        @RequestParam @NotNull(message = "pageSize not null") final Integer pageSize) {
        PageParameter pageParameter = new PageParameter(currentPage, pageSize);
        return ShenyuAdminResult.success(ShenyuResultMessage.QUERY_SUCCESS, this.mockRequestRecordService.listByPage(new MockRequestRecordQuery(apiId, host, url,
                pathVariable, header, pageParameter)));
    }
@Test
    public void testListByPage() throws Exception {
        CommonPager<MockRequestRecordVO> commonPager = new CommonPager<>();
        commonPager.setDataList(Lists.newArrayList(buildMockRequestRecordVO()));
        given(mockRequestRecordService.listByPage(any())).willReturn(commonPager);
        this.mockMvc.perform(MockMvcRequestBuilders.get("/mock/findPageByQuery")
                        .param("apiId", "123")
                        .param("currentPage", 1 + "")
                        .param("pageSize", 10 + ""))
                .andExpect(status().isOk())
                .andExpect(jsonPath("$.message", is(ShenyuResultMessage.QUERY_SUCCESS)))
                .andExpect(jsonPath("$.data.dataList[0].apiId", is("123")))
                .andReturn();
    }