@Override
    public Mono<UserDetails> updatePassword(UserDetails user, String newPassword) {
        return userService.updatePassword(user.getUsername(), newPassword)
            .map(u -> withNewPassword(user, newPassword));
    }
@Test
    void shouldUpdatePasswordSuccessfully() {
        var fakeUser = createFakeUserDetails();

        var user = new run.halo.app.core.extension.User();

        when(userService.updatePassword("faker", "new-fake-password")).thenReturn(
            Mono.just(user)
        );

        var userDetailsMono = userDetailService.updatePassword(fakeUser, "new-fake-password");

        StepVerifier.create(userDetailsMono)
            .expectSubscription()
            .assertNext(userDetails -> assertEquals("new-fake-password", userDetails.getPassword()))
            .verifyComplete();

        verify(userService, times(1)).updatePassword(eq("faker"), eq("new-fake-password"));
    }