@Test
public void test_deleteAppRole() throws Exception {

    // Mock response
    String responseMessage = "{\"messages\":[\"AppRole deleted\"]}";
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body(responseMessage);
    UserDetails userDetails = getMockUser(false);
    when(appRoleService.deleteAppRole(eq("5PDrOhsy4ig8L3EpsJZSLAMg"), Mockito.any(), Mockito.any())).thenReturn(responseEntityExpected);
    mockMvc.perform(MockMvcRequestBuilders.delete("/v2/auth/approle/role/approle1").requestAttr("UserDetails", userDetails)
            .header("vault-token", "5PDrOhsy4ig8L3EpsJZSLAMg")
            .header("Content-Type", "application/json;charset=UTF-8"))
            .andExpect(status().isOk())
            .andExpect(content().string(containsString(responseMessage)));
}