@Test
    public void testAccessTokenExpiration(){

        val profile = new OidcProfile();
        profile.setAccessToken(new BearerAccessToken(ID_TOKEN));

        assertTrue(profile.isExpired());

        var cs = new JWTClaimsSet.Builder().expirationTime(Date.from(Instant.now().plusSeconds(30))).build();

        profile.setAccessToken(new BearerAccessToken(new PlainJWT(cs).serialize()));

        assertFalse(profile.isExpired());
    }
Test experation based on access token exp date.
pac4j-oidc/src/test/java/org/pac4j/oidc/profile/OidcProfileTests.java