@PostMapping("/get_two_factor")
    @Operation(summary = "Get the two factor setting of an account")
    public DTwoFactorStatusResult getTwoFactor(@RequestBody DAccountRequest deprecatedRequest) {
        AppSession appSession = validate(deprecatedRequest);

        var result =  accountService.getTwoFactorStatus(appSession.getAccountId(), appSession.getDeviceName(), appSession.getAppCode());
        return DTwoFactorStatusResult.copyFrom(result);
    }
@Test
    public void validTwoFactorStatus() {
        DAccountRequest request = new DAccountRequest();
        request.setAppSessionId("id");

        TwoFactorStatusResult result = new TwoFactorStatusResult();
        result.setStatus(Status.OK);
        result.setError("error");

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

        DTwoFactorStatusResult twoFactor = twoFactorController.getTwoFactor(request);

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