@PostMapping("/updateDetailPath")
    @RequiresPermissions("system:authen:editResourceDetails")
    public ShenyuAdminResult updateDetailPath(@RequestBody @Valid final AuthPathWarpDTO authPathWarpDTO) {
        return appAuthService.updateDetailPath(authPathWarpDTO);
    }
@Test
    public void testUpdateDetailPath() throws Exception {
        final AuthPathDTO authPathDTO = new AuthPathDTO();
        authPathDTO.setAppName("testApp");
        authPathDTO.setPath("/test");
        authPathDTO.setEnabled(true);
        List<AuthPathDTO> authPathDTOS = new ArrayList<>();
        authPathDTOS.add(authPathDTO);

        final AuthPathWarpDTO authPathWarpDTO = new AuthPathWarpDTO();
        authPathWarpDTO.setId("0001");
        authPathWarpDTO.setAuthPathDTOList(authPathDTOS);
        ConfigurableApplicationContext context = mock(ConfigurableApplicationContext.class);
        SpringBeanUtils.getInstance().setApplicationContext(context);
        when(SpringBeanUtils.getInstance().getBean(AppAuthMapper.class)).thenReturn(appAuthMapper);
        when(appAuthMapper.existed(authPathWarpDTO.getId())).thenReturn(true);
        given(this.appAuthService.updateDetailPath(authPathWarpDTO)).willReturn(ShenyuAdminResult.success());
        this.mockMvc.perform(MockMvcRequestBuilders.post("/appAuth/updateDetailPath")
                .contentType(MediaType.APPLICATION_JSON)
                .content(GsonUtils.getInstance().toJson(authPathWarpDTO)))
                .andExpect(status().isOk())
                .andExpect(jsonPath("$.code", is(CommonErrorCode.SUCCESSFUL)))
                .andReturn();
    }