@Test
    public void testGetOneExpiredProfileFromSession() {
        profile1 = mock(CommonProfile.class);
        when(profile1.getId()).thenReturn(ID1);
        when(profile1.getClientName()).thenReturn(CLIENT1);
        when(profile1.isExpired()).thenReturn(true);
        profiles.put(CLIENT1, profile1);
        sessionStore.set(context, Pac4jConstants.USER_PROFILES, profiles);
        assertFalse(profileManager.getProfile().isPresent());
        assertFalse(profileManager.isAuthenticated());
        Map<String, UserProfile> profiles =
            (LinkedHashMap<String, UserProfile>) sessionStore.get(context, Pac4jConstants.USER_PROFILES).get();
        assertEquals(0, profiles.size());
    }
Tests {@link ProfileManager}.

@author Jerome Leleu
@since 1.9.0
pac4j-core/src/test/java/org/pac4j/core/profile/ProfileManagerTests.java