@PostMapping("")
    @RequiresPermissions(value = {"system:resource:addMenu", "system:resource:addButton"}, logical = Logical.OR)
    public ShenyuAdminResult createResource(@Valid @RequestBody final CreateResourceDTO createResourceDTO) {
        return ShenyuAdminResult.success(ShenyuResultMessage.CREATE_SUCCESS, resourceService.create(createResourceDTO));
    }
@Test
    public void testCreateResource() throws Exception {
        final CreateResourceDTO createResourceDTO = new CreateResourceDTO();
        fill(createResourceDTO);
        given(resourceService.create(any())).willReturn(1);

        this.mockMvc.perform(MockMvcRequestBuilders.post("/resource")
                .contentType(MediaType.APPLICATION_JSON)
                .content(GsonUtils.getInstance().toJson(createResourceDTO)))
                .andExpect(content().json(GsonUtils.getInstance().toJson(ShenyuAdminResult.success(ShenyuResultMessage.CREATE_SUCCESS, 1))))
                .andReturn();
    }