@Test
public void test_deleteUser() throws Exception {

    UserLogin user = new UserLogin();
    user.setUsername("testuser");
    String inputJson =new ObjectMapper().writeValueAsString(user);
    String responseMessage = "{\"messages\":[\"Username User deleted\"]}";
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body(responseMessage);
    when(userpassService.deleteUser(eq("5PDrOhsy4ig8L3EpsJZSLAMg"),Mockito.any())).thenReturn(responseEntityExpected);
    mockMvc.perform(MockMvcRequestBuilders.delete("/v2/auth/userpass/users/user1")
            .header("vault-token", "5PDrOhsy4ig8L3EpsJZSLAMg")
            .header("Content-Type", "application/json;charset=UTF-8")
            .content(inputJson))
            .andExpect(status().isOk())
            .andExpect(content().string(containsString(responseMessage)));
}