@PostMapping("/status")
    @Operation(summary = "Get the email status of an account")
    public DEmailStatusResult getEmailStatus(@RequestBody DAccountRequest deprecatedRequest) {
        AppSession appSession = validate(deprecatedRequest);

        var result = accountService.getEmailStatus(appSession.getAccountId());
        return DEmailStatusResult.copyFrom(result);
    }
@Test
    public void validEmailStatusVerified() {
        DAccountRequest request = new DAccountRequest();
        request.setAppSessionId("id");

        EmailStatusResult result = new EmailStatusResult();
        result.setStatus(Status.OK);
        result.setError("error");
        result.setEmailStatus(EmailStatus.VERIFIED);
        result.setEmailAddress("address");
        result.setActionNeeded(true);

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

        DEmailStatusResult emailStatus = emailController.getEmailStatus(request);

        assertEquals(Status.OK, emailStatus.getStatus());
        assertEquals("error", emailStatus.getError());
        assertEquals(EmailStatus.VERIFIED, emailStatus.getEmailStatus());
        assertEquals("address", emailStatus.getCurrentEmailAddress());
        assertEquals(true, emailStatus.getUserActionNeeded());
    }