@PostMapping("/apply")
    @RequiresPermissions("system:authen:add")
    public ShenyuAdminResult apply(@Valid @RequestBody final AuthApplyDTO authApplyDTO) {
        if (StringUtils.isNoneBlank(authApplyDTO.getAppKey())) {
            return appAuthService.applyUpdate(authApplyDTO);
        }
        return appAuthService.applyCreate(authApplyDTO);
    }
@Test
    public void testApply() throws Exception {
        final AuthApplyDTO authApplyDTO = new AuthApplyDTO();
        List<String> pathList = new ArrayList<>();
        pathList.add("/test");
        authApplyDTO.setAppName("testApp");
        authApplyDTO.setUserId("testUser");
        authApplyDTO.setPhone("+1234567");
        authApplyDTO.setAppParam("{\"type\": \"test\"}");
        authApplyDTO.setExtInfo("{\"extInfo\": \"test\"}");
        authApplyDTO.setOpen(true);
        authApplyDTO.setPathList(pathList);
        given(this.appAuthService.applyCreate(authApplyDTO)).willReturn(
                ShenyuAdminResult.success(ShenyuResultMessage.CREATE_SUCCESS));
        this.mockMvc.perform(MockMvcRequestBuilders.post("/appAuth/apply")
                .contentType(MediaType.APPLICATION_JSON)
                .content(GsonUtils.getInstance().toJson(authApplyDTO)))
                .andExpect(status().isOk())
                .andExpect(jsonPath("$.message", is(ShenyuResultMessage.CREATE_SUCCESS)))
                .andReturn();
    }