@Test
public void test_updatePassword() throws Exception {

    UserpassUser user = new UserpassUser("testuser", "testuser", "default");
    String inputJson =new ObjectMapper().writeValueAsString(user);
    String responseMessage = "{\"messages\":[\"Password for the user updated\"]}";
    ResponseEntity<String> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body(responseMessage);
    when(userpassService.updatePassword(eq("5PDrOhsy4ig8L3EpsJZSLAMg"), Mockito.any())).thenReturn(responseEntityExpected);
    mockMvc.perform(MockMvcRequestBuilders.put("/v2/auth/userpass/users")
            .header("vault-token", "5PDrOhsy4ig8L3EpsJZSLAMg")
            .header("Content-Type", "application/json;charset=UTF-8")
            .content(inputJson))
            .andExpect(status().isOk())
            .andExpect(content().string(containsString(responseMessage)));
}