@GetMapping("")
    @RequiresPermissions("system:role:list")
    public ShenyuAdminResult queryRole(final String roleName,
                                       @RequestParam @NotNull final Integer currentPage,
                                       @RequestParam @NotNull final Integer pageSize) {
        CommonPager<RoleVO> commonPager = roleService.listByPage(new RoleQuery(roleName, new PageParameter(currentPage, pageSize)));
        return ShenyuAdminResult.success(ShenyuResultMessage.QUERY_SUCCESS, commonPager);
    }
@Test
    public void testQueryRole() throws Exception {
        RoleVO roleVO = buildRoleVO();
        PageParameter pageParameter = new PageParameter();
        RoleQuery query = new RoleQuery(roleVO.getRoleName(), pageParameter);
        given(roleService.listByPage(query)).willReturn(new CommonPager<>(pageParameter, Collections.singletonList(roleVO)));
        String urlTemplate = "/role?roleName={roleName}&currentPage={currentPage}&pageSize={pageSize}";
        this.mockMvc.perform(MockMvcRequestBuilders.get(urlTemplate, roleVO.getRoleName(), pageParameter.getCurrentPage(), pageParameter.getPageSize()))
            .andExpect(status().isOk())
            .andExpect(jsonPath("$.message", is(ShenyuResultMessage.QUERY_SUCCESS)))
            .andExpect(jsonPath("$.data.dataList[0].id", is(roleVO.getId())))
            .andReturn();
    }