@Test
public void test_deleteSafe() throws Exception {

    String responseJson = "{\"messages\":[\"Safe deleted\"]}";
    SafeBasicDetails safeBasicDetails = new SafeBasicDetails("mysafe01", "youremail@yourcompany.com", null, "My first safe");
    Safe safe = new Safe("shared/mysafe01",safeBasicDetails);
    String inputJson =new ObjectMapper().writeValueAsString(safe);
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body(responseJson);
    UserDetails userDetails = getMockUser(false);
    when(safesService.deleteSafe(eq("5PDrOhsy4ig8L3EpsJZSLAMg"), Mockito.any() , Mockito.any(UserDetails.class))).thenReturn(responseEntityExpected);
    mockMvc.perform(MockMvcRequestBuilders.delete("/v2/sdb")
            .header("vault-token", "5PDrOhsy4ig8L3EpsJZSLAMg")
            .header("Content-Type", "application/json;charset=UTF-8")
            .content(inputJson))
            .andExpect(status().isOk())
            .andExpect(content().string(containsString(responseJson)));
}