@PostMapping("/updateDetail")
    @RequiresPermissions("system:authen:edit")
    public ShenyuAdminResult updateDetail(@RequestBody @Valid final AppAuthDTO appAuthDTO) {
        return appAuthService.updateDetail(appAuthDTO);
    }
@Test
    public void testUpdateDetail() throws Exception {
        AppAuthDTO appAuthDTO = new AppAuthDTO();
        appAuthDTO.setId("0001");
        appAuthDTO.setAppKey("app key");
        appAuthDTO.setAppSecret("app secret");
        appAuthDTO.setPhone("1234567");
        given(this.appAuthService.updateDetail(appAuthDTO)).willReturn(
                ShenyuAdminResult.success(ShenyuResultMessage.UPDATE_SUCCESS));
        ConfigurableApplicationContext context = mock(ConfigurableApplicationContext.class);
        SpringBeanUtils.getInstance().setApplicationContext(context);
        when(SpringBeanUtils.getInstance().getBean(AppAuthMapper.class)).thenReturn(appAuthMapper);
        when(appAuthMapper.existed(appAuthDTO.getId())).thenReturn(true);
        this.mockMvc.perform(MockMvcRequestBuilders.post("/appAuth/updateDetail")
                .contentType(MediaType.APPLICATION_JSON)
                .content(GsonUtils.getInstance().toJson(appAuthDTO)))
                .andExpect(status().isOk())
                .andExpect(jsonPath("$.message", is(ShenyuResultMessage.UPDATE_SUCCESS)))
                .andReturn();
    }