@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 testGetUserPermissionByTokenNull() {
        when(mockPermissionService.getPermissionMenu("token")).thenReturn(null);
        final ShenyuAdminResult result = permissionController.getUserPermissionByToken("token");
        assertThat(result.getCode(), is(CommonErrorCode.ERROR));
        assertThat(result.getMessage(), is(ShenyuResultMessage.MENU_FAILED));
    }