@Test
    public void testPlainJwtNoSubject() {
        val generator = new JwtGenerator();
        val token = generator.generate(new HashMap<>());
        var authenticator = new JwtAuthenticator();
        TestsHelper.expectException(() -> authenticator.validateToken(token), TechnicalException.class,
            "The JWT must contain a subject or an id must be generated via the identifierGenerator");
    }
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