@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("namespaceId")).thenReturn(permissionMenuVO);
        final ShenyuAdminResult result = permissionController.getUserPermissionByToken("token", "namespaceId");
        assertThat(result.getCode(), is(CommonErrorCode.SUCCESSFUL));
        assertThat(result.getMessage(), is(ShenyuResultMessage.MENU_SUCCESS));
        assertThat(result.getData(), is(permissionMenuVO));
    }
add test case for {@link PermissionController}.
shenyu-admin/src/test/java/org/apache/shenyu/admin/controller/PermissionControllerTest.java