@Override
    public AppResponse process(Flow flow, CheckAuthenticationStatusRequest request){
        switch(appSession.getState()) {
            case "AUTHENTICATION_REQUIRED", "AWAITING_QR_SCAN":
                return new CheckAuthenticationStatusResponse("PENDING", false);
            case "RETRIEVED", "AWAITING_CONFIRMATION":
                return new CheckAuthenticationStatusResponse("PENDING", true);
            case "CONFIRMED":
                return new StatusResponse("PENDING_CONFIRMED");
            case "AUTHENTICATED":
                return new OkResponse();
            case "CANCELLED":
                return new StatusResponse("CANCELLED");
            case "ABORTED":
                if (appSession.getAbortCode().equals("verification_code_invalid")) {
                    String logCode = "wid_checker".equals(request.getAppType()) ? "1320" : "1368";
                    digidClient.remoteLog(logCode, Map.of(HIDDEN, true));
                }
                return new NokResponse();
            default:
                return new CheckAuthenticationStatusResponse("PENDING", false);
        }
    }
@Test
    void processRetrieved(){
        appSession.setState("RETRIEVED");

        AppResponse response = checkAuthenticationStatus.process(flow, request);

        assertTrue(response instanceof CheckAuthenticationStatusResponse);
        assertEquals("PENDING", ((CheckAuthenticationStatusResponse) response).getStatus());
        assertEquals(true, ((CheckAuthenticationStatusResponse) response).isSessionReceived());
    }