@Test
    public void testEncryptDecryptPlainJWTBase64Secret() throws ParseException, JOSEException {
        val config = new SecretEncryptionConfiguration();
        config.setSecretBase64(BASE64_256_BIT_ENC_SECRET);

        config.setAlgorithm(JWEAlgorithm.A256GCMKW);
        config.setMethod(EncryptionMethod.A128GCM);

        final JWT jwt = new PlainJWT(buildClaims());
        val token = config.encrypt(jwt);
        val encryptedJwt = (EncryptedJWT) JWTParser.parse(token);
        config.decrypt(encryptedJwt);
        final JWT jwt2 = encryptedJwt;
        assertEquals(VALUE, jwt2.getJWTClaimsSet().getSubject());
    }
Tests {@link SecretEncryptionConfiguration}.

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