public MijnDigidSession createSession(String appSessionId){
        MijnDigidSession session = new MijnDigidSession(15 * 60);

        Optional<AppSession> appSession = appClient.getAppSession(appSessionId);

        if(appSession.isPresent()) {
            session.setAccountId(appSession.get().getAccountId());
            session.setAuthenticated(appSession.get().isAuthenticated());
        }

        mijnDigiDSessionRepository.save(session);
        return session;
    }
@Test
    void testCreateNonAuthenticatedAppSession() {
        String appSessionId = "appSessionId";
        AppSession appSession = new AppSession();
        appSession.setState("NOT");
        appSession.setAccountId(12L);
        when(appClient.getAppSession(eq(appSessionId))).thenReturn(Optional.of(appSession));

        MijnDigidSession session = mijnDigiDSessionService.createSession(appSessionId);

        verify(appClient, times(1)).getAppSession(eq(appSessionId));
        verify(mijnDigiDSessionRepository, times(1)).save(any());
        assertFalse(session.isAuthenticated());
    }