@PostMapping("/account_status")
    @Operation(summary = "Get the data of aan an account")
    public DAccountDataResult getAccountData(@RequestBody DAccountRequest request) {
        AppSession appSession = validate(request);
        long accountId = appSession.getAccountId();
        AccountDataResult result = accountService.getAccountData(accountId);
        return DAccountDataResult.copyFrom(result);
    }
@Test
    public void validRequest() {
        DAccountRequest request = new DAccountRequest();
        request.setAppSessionId("id");

        AccountDataResult result = new AccountDataResult();
        result.setStatus(Status.OK);
        result.setError("error");
        result.setEmailStatus(EmailStatus.NOT_VERIFIED);
        result.setClassifiedDeceased(true);
        result.setSetting2Factor(true);
        result.setUnreadNotifications(1);
        result.setCurrentEmailAddress("email");

        when(accountService.getAccountData(eq(1L))).thenReturn(result);

        DAccountDataResult accountData = accountDataController.getAccountData(request);

        assertEquals(Status.OK, accountData.getStatus());
        assertEquals("error", accountData.getError());
        assertEquals(EmailStatus.NOT_VERIFIED, accountData.getEmailStatus());
        assertEquals(true, accountData.getClassifiedDeceased());
        assertEquals(1, accountData.getUnreadNotifications());
        assertEquals(true, accountData.getSetting2Factor());
        assertEquals("email", accountData.getCurrentEmailAddress());
    }