@GetMapping("/menu")
    @RequiresPermissions("system:manager:configureDataPermission")
    public ShenyuAdminResult getMenuTree() {
        List<MenuInfo> menuInfoList = resourceService.getMenuTree();
        if (CollectionUtils.isNotEmpty(menuInfoList)) {
            return ShenyuAdminResult.success(ShenyuResultMessage.QUERY_SUCCESS, menuInfoList);
        }
        return ShenyuAdminResult.error(ShenyuResultMessage.QUERY_FAILED);
    }
@Test
    public void testQueryMenuTreeResultFailed() throws Exception {
        given(resourceService.getMenuTree()).willReturn(newArrayList());

        this.mockMvc.perform(MockMvcRequestBuilders.get("/resource/menu"))
                .andExpect(content().json(GsonUtils.getInstance().toJson(ShenyuAdminResult.error(ShenyuResultMessage.QUERY_FAILED))))
                .andReturn();
    }