@Test
    public void testForceAuthentication() {
        this.logic.setLoadProfilesFromSession(false);
        var profile = new CommonProfile();
        profile.setId(ID);
        Map<String, CommonProfile> profiles = new LinkedHashMap<>();
        profiles.put(NAME, profile);
        sessionStore.set(context, Pac4jConstants.USER_PROFILES, profiles);
        var indirectClient = new MockIndirectClient(NAME,
            new FoundAction(PAC4J_URL), Optional.of(new MockCredentials()), new CommonProfile());
        authorizers = NAME;
        config.setClients(new Clients(CALLBACK_URL, indirectClient));
        config.addAuthorizer(NAME, (context, store, prof) -> ID.equals(prof.get(0).getId()));
        call();
        assertNotNull(action);
        assertEquals(302, action.getCode());
    }
Tests {@link DefaultSecurityLogic}.

@author Jerome Leleu
@since 1.9.0
pac4j-core/src/test/java/org/pac4j/core/engine/DefaultSecurityLogicTests.java