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

        Map<String, String> result = digidClient.replaceExistingAccount(appSession.getRegistrationId(), request.isReplaceAccount(), appSession.getLanguage());

        if (result.get(lowerUnderscore(STATUS)).equals("OK") && result.get(lowerUnderscore(ACCOUNT_ID)) != null) {
            appSession.setAccountId(Long.valueOf(result.get(lowerUnderscore(ACCOUNT_ID))));
            return new OkResponse();
        } else {
            return new NokResponse();
        }
    }
@Test
    void processNOKMissingRegistrationTest(){
        replaceExistingAccount.getAppSession().setRegistrationId(null);

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

        assertTrue(appResponse instanceof NokResponse);
        assertEquals("NOK", ((NokResponse) appResponse).getStatus());
    }