@GetMapping("/getUserPermissionByToken")
    public ShenyuAdminResult getUserPermissionByToken(@RequestParam(name = "token") final String token) {
        PermissionMenuVO permissionMenuVO = permissionService.getPermissionMenu(token);
        return Optional.ofNullable(permissionMenuVO)
                .map(item -> ShenyuAdminResult.success(ShenyuResultMessage.MENU_SUCCESS, item))
                .orElseGet(() -> ShenyuAdminResult.error(ShenyuResultMessage.MENU_FAILED));
    }
@Test
    public void testGetUserPermissionByToken() {
        final PermissionMenuVO permissionMenuVO = new PermissionMenuVO(
                Collections.singletonList(new MenuInfo("id", "name", "url", "component",
                        new Meta("icon", "title"), Collections.emptyList(), 0)),
                Collections.singletonList(new AuthPerm("perms1", "description1", "icon")),
                Collections.singletonList(new AuthPerm("perms2", "description2", "icon")));
        when(mockPermissionService.getPermissionMenu("token")).thenReturn(permissionMenuVO);
        final ShenyuAdminResult result = permissionController.getUserPermissionByToken("token");
        assertThat(result.getCode(), is(CommonErrorCode.SUCCESSFUL));
        assertThat(result.getMessage(), is(ShenyuResultMessage.MENU_SUCCESS));
        assertThat(result.getData(), is(permissionMenuVO));
    }