@Override
    public AppResponse process(Flow flow, RequestAccountRequest request) {
        digidClient.remoteLog("3");

        Map<String, Object> result = digidClient.createRegistration(request);

        if (result.get(lowerUnderscore(STATUS)).equals("NOK")) {
            if (result.get(ERROR) != null) {
                return new StartAccountRequestNokResponse((String) result.get(ERROR), result);
            }
            return new NokResponse();
        }

        appSession = new AppSession();
        appSession.setState(State.INITIALIZED.name());
        appSession.setFlow(flow.getName());
        appSession.setRegistrationId(Long.valueOf((Integer) result.get(lowerUnderscore(REGISTRATION_ID))));
        appSession.setLanguage(request.getLanguage());
        appSession.setNfcSupport(request.getNfcSupport());
        if (!request.getNfcSupport()) {
            digidClient.remoteLog("1506", Map.of(lowerUnderscore(REGISTRATION_ID), appSession.getRegistrationId()));
        }

        digidClient.remoteLog("6", Map.of(lowerUnderscore(REGISTRATION_ID), appSession.getRegistrationId()));

        return new AppSessionResponse(appSession.getId(), Instant.now().getEpochSecond());
    }
@Test
    void processOKTest(){
        RequestAccountRequest requestAccountRequest = createRequest();
        Long registrationId = 1337L;

        when(digidClientMock.createRegistration(requestAccountRequest)).thenReturn(Map.of(
            lowerUnderscore(STATUS), "OK",
            lowerUnderscore(REGISTRATION_ID), Math.toIntExact(registrationId)
            ));
        when(flowMock.getName()).thenReturn(RequestAccountAndAppFlow.NAME);

        AppResponse appResponse = startAccountRequest.process(flowMock, requestAccountRequest);

        verify(digidClientMock, times(1)).remoteLog("3");
        verify(digidClientMock, times(1)).remoteLog("6", ImmutableMap.of(lowerUnderscore(REGISTRATION_ID), registrationId));
        verify(digidClientMock, times(1)).remoteLog("1506", ImmutableMap.of(lowerUnderscore(REGISTRATION_ID), registrationId));
        assertTrue(appResponse instanceof AppSessionResponse);
        assertNotNull(((AppSessionResponse) appResponse).getAppSessionId());
        assertEquals(State.INITIALIZED.name(), startAccountRequest.getAppSession().getState());
        assertEquals(RequestAccountAndAppFlow.NAME, startAccountRequest.getAppSession().getFlow());
        assertEquals(registrationId, startAccountRequest.getAppSession().getRegistrationId());
        assertEquals("NL", startAccountRequest.getAppSession().getLanguage());
        assertFalse(startAccountRequest.getAppSession().isNfcSupport());
    }