@Test
    public void testEncryptDecryptSignedJWT() throws ParseException, JOSEException {
        SignatureConfiguration macConfig = new SecretSignatureConfiguration(MAC_SECRET);
        val signedJWT = macConfig.sign(buildClaims());

        val config = new ECEncryptionConfiguration(buildKeyPair());
        config.setAlgorithm(JWEAlgorithm.ECDH_ES_A128KW);
        config.setMethod(EncryptionMethod.A192CBC_HS384);
        val token = config.encrypt(signedJWT);
        val encryptedJwt = (EncryptedJWT) JWTParser.parse(token);
        config.decrypt(encryptedJwt);
        val signedJWT2 = encryptedJwt.getPayload().toSignedJWT();
        assertEquals(VALUE, signedJWT2.getJWTClaimsSet().getSubject());
    }
Tests {@link ECEncryptionConfiguration}.

@author Jerome Leleu
@since 1.9.2
pac4j-jwt/src/test/java/org/pac4j/jwt/config/encryption/ECEncryptionConfigurationTests.java