@Override
    public AppResponse process(Flow flow, AppSessionRequest request) {
        if (appSession.getRegistrationId() == null) {
            return new NokResponse();
        }

        Map<String, String> result = digidClient.getExistingAccount(appSession.getRegistrationId(), appSession.getLanguage());

        if (result.get(lowerUnderscore(STATUS)).equals("OK") && result.get(lowerUnderscore(ACCOUNT_ID)) != null) {
            appSession.setAccountId(Long.valueOf(result.get(lowerUnderscore(ACCOUNT_ID))));
            digidClient.remoteLog("54", Map.of(lowerUnderscore(ACCOUNT_ID), appSession.getAccountId()));
            return new OkResponse();
        } else if (result.get(lowerUnderscore(STATUS)).equals("PENDING")) {
            // switch state to require replace action
            appSession.setState(State.EXISTING_ACCOUNT_FOUND.name());
            return new StatusResponse("PENDING");
        } else {
            return new NokResponse();
        }
    }
@Test
    void processOKTest(){
        when(digidClientMock.getExistingAccount(1337L, "NL")).thenReturn(Map.of(
            lowerUnderscore(STATUS), "OK",
            lowerUnderscore(ACCOUNT_ID), "1"
        ));

        AppResponse appResponse = checkExistingAccount.process(flowMock, null);

        assertEquals(1, checkExistingAccount.getAppSession().getAccountId());
        assertTrue(appResponse instanceof OkResponse);
        assertEquals("OK", ((OkResponse) appResponse).getStatus());
        verify(digidClientMock, times(1)).remoteLog("54", Map.of(lowerUnderscore(ACCOUNT_ID), 1L));
    }