public AccountResult confirmEmail(long accountId, EmailConfirmRequest request) {
        Map<String, Object> resultMap = accountClient.confirmEmail(accountId, request.getEmailAddressConfirmed());
        return objectMapper.convertValue(resultMap, AccountResult.class);
    }
@Test
    public void testConfirmEmail() {
        EmailConfirmRequest request = new EmailConfirmRequest();
        request.setEmailAddressConfirmed(true);

        Map<String, Object> result = Map.of(
                "status", "OK",
                "error", "custom error");

        when(accountClient.confirmEmail(eq(1L), eq(true))).thenReturn(result);

        AccountResult accountResult = accountService.confirmEmail(1L, request);

        assertEquals(Status.OK, accountResult.getStatus());
        assertEquals("custom error", accountResult.getError());
    }