@Test
    public void testNoOidcProfileWithoutAuthenticator() throws Exception {
        when(configuration.isIncludeAccessTokenClaimsInProfile()).thenReturn(false);
        when(configuration.isCallUserInfoEndpoint()).thenReturn(false);
        ProfileCreator creator = new OidcProfileCreator(configuration, new OidcClient(configuration));
        var webContext = MockWebContext.create();
        var credentials = new TokenCredentials();

        var accessTokenClaims = new JWTClaimsSet.Builder(idTokenClaims.toJWTClaimsSet()).claim("client", "pac4j").build();
        var accessTokenToken = new PlainJWT(accessTokenClaims);
        credentials.setToken(accessTokenToken.serialize());

        assertThrows(OidcConfigurationException.class,
            () -> creator.create(new CallContext(webContext, new MockSessionStore()), credentials));
    }
Tests {@link OidcProfileCreatorTests}.

@author Misagh Moayyed
@since 5.4.4
pac4j-oidc/src/test/java/org/pac4j/oidc/profile/creator/OidcProfileCreatorTests.java