@Test
    public void testGenerateAuthenticateDifferentSignatureConfiguration() throws NoSuchAlgorithmException {
        val generator = new JwtGenerator(new SecretSignatureConfiguration(KEY2));
        val profile = createProfile();
        val token = generator.generate(profile);
        val jwtAuthenticator = new JwtAuthenticator();
        jwtAuthenticator.addSignatureConfiguration(buildECSignatureConfiguration());
        val e = TestsHelper.expectException(() -> assertToken(profile, token, jwtAuthenticator));
        assertTrue(e.getMessage().startsWith("No signature algorithm found for JWT:"));
    }
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