@PostMapping("/verify")
    @Operation(summary = "Verify email address by user entering verificationcode")
    public DEmailVerifyResult verifyEmail(@RequestBody DEmailVerifyRequest deprecatedRequest) {
        validateVerificationCode(deprecatedRequest);
        AppSession appSession = validate(deprecatedRequest);


        var request = deprecatedRequest.getRequest();
        var result = accountService.verifyEmail(appSession.getAccountId(), request);

        return DEmailVerifyResult.copyFrom(result);
    }
@Test
    public void validEmailVerify() {
        DEmailVerifyRequest request = new DEmailVerifyRequest();
        request.setAppSessionId("id");
        request.setVerificationCode("code");

        EmailVerifyResult result = new EmailVerifyResult();
        result.setStatus(Status.OK);
        result.setError("error");
        result.setRemainingAttempts(6);

        when(accountService.verifyEmail(eq(1L), any())).thenReturn(result);

        DEmailVerifyResult verifyResult = emailController.verifyEmail(request);

        assertEquals(Status.OK, verifyResult.getStatus());
        assertEquals("error", verifyResult.getError());
        assertEquals(6, verifyResult.getRemainingAttempts());
    }