@Override
    public AppResponse process(Flow flow, MrzDocumentRequest params) {
        if(!(params.getDocumentType().equals("PASSPORT") || params.getDocumentType().equals("ID_CARD"))){
            return new NokResponse();
        }
        Map<String, String> travelDocument = Map.of(
            "documentNumber", params.getDocumentNumber(),
            "dateOfBirth", params.getDateOfBirth(),
            "dateOfExpiry", params.getDateOfExpiry());

        digidClient.remoteLog("867", Map.of(lowerUnderscore(ACCOUNT_ID), appSession.getAccountId(), HIDDEN, true));
        appSession.setRdaSessionStatus("DOCUMENTS_RECEIVED");

        Map<String, String> rdaSession = rdaClient.startSession(
            returnUrl.concat("/iapi/rda/confirm"),
            appSession.getId(), params.getIpAddress(), List.of(travelDocument), List.of());

        if(rdaSession.isEmpty()){
            digidClient.remoteLog("873", Map.of(lowerUnderscore(ACCOUNT_ID), appSession.getAccountId(), HIDDEN, true));
            return new NokResponse();
        }
        appSession.setConfirmSecret(rdaSession.get("confirmSecret"));
        appSession.setUrl(rdaSession.get("url"));
        appSession.setRdaSessionId(rdaSession.get("sessionId"));
        appSession.setRdaSessionTimeoutInSeconds(rdaSession.get("expiration"));
        appSession.setRdaSessionStatus("SCANNING_FOREIGN");
        appSession.setRdaDocumentType(params.getDocumentType());
        appSession.setRdaDocumentNumber(params.getDocumentNumber());
        digidClient.remoteLog("868", Map.of(lowerUnderscore(ACCOUNT_ID), appSession.getAccountId(), HIDDEN, true));

        return new RdaResponse(appSession.getUrl(), appSession.getRdaSessionId());
    }
@Test
    public void processNOK() {
        //given
        MrzDocumentRequest mrzDocumentRequest  = new MrzDocumentRequest();
        mrzDocumentRequest.setDocumentType("A");
        //when
        AppResponse appResponse = mrzDocumentInitialized.process(mockedFlow, mrzDocumentRequest);
        //then
        assertTrue(appResponse instanceof NokResponse);
    }