@Test
    public void testPlainJwtExpiredByAuthenticator() {
        val generator = new JwtGenerator();
        Map<String, Object> claims = new HashMap<>();
        claims.put(JwtClaims.SUBJECT, ID);
        claims.put(JwtClaims.EXPIRATION_TIME, tomorrow());
        val token = generator.generate(claims);
        var authenticator = new JwtAuthenticator();
        val expDate = new Date();
        expDate.setHours(-1);
        authenticator.setExpirationTime(expDate);
        assertNull(authenticator.validateToken(token));
    }
This class tests the {@link JwtGenerator} and {@link JwtAuthenticator}.

@author Jerome Leleu
@since 1.8.0
pac4j-jwt/src/test/java/org/pac4j/jwt/JwtTests.java