@SneakyThrows
@Test
void changePasswordTest() {

    String newPassword = "NEW!";
    mvc.perform(post("/user/password")
            .contentType(MediaType.APPLICATION_JSON)
            .accept(MediaType.APPLICATION_JSON)
            .characterEncoding("UTF-8")
            .content("{\"newPassword\": \"" + newPassword + "\"}")
            .header("user", TEST_USER)
            .header("password", TEST_PASS)
            .header("token", token)
    )
            .andExpect(status().isOk());
    verify(userProfile).updateReadKeyPassword(
            eq(new UserIDAuth(TEST_USER, TEST_PASS)),
            password.capture()
    );
    assertThat(password.getValue().getValue()).isEqualTo(newPassword.toCharArray());
}