@Override
    public AppResponse process(Flow flow, SessionDataRequest request) throws SharedServiceClientException {

        return validateAmountOfApps(flow, appSession.getAccountId(), request)
            .orElseGet(() -> validateSms(flow, appSession.getAccountId(), request.getSmscode())
                .orElseGet(() -> confirmSession(flow, request)));
    }
@Test
    void processUndefinedFlow() throws SharedServiceClientException {
        AppResponse appResponse = sessionConfirmed.process(mockedUndefinedFlow, mockedSessionDataRequest);

        AppAuthenticator appAuthenticator = sessionConfirmed.getAppAuthenticator();
        assertSame(mockedAppAuthenticator, appAuthenticator);
        assertEquals(DEVICE_NAME, appAuthenticator.getDeviceName());
        assertEquals(SESSION_DATA_REQUEST_INSTANCE_ID, appAuthenticator.getInstanceId());
        assertEquals(VALID_RESPONSE_CODE, ((SessionDataResponse)appResponse).getStatus());
        assertEquals(APP_AUTHENTICATOR_USER_APP_ID, ((SessionDataResponse)appResponse).getUserAppId());
    }