@Test
    public void testDecryptMissingKey() throws ParseException {
        val config = new RSAEncryptionConfiguration(buildKeyPair());
        config.setAlgorithm(JWEAlgorithm.RSA_OAEP);
        config.setMethod(EncryptionMethod.A128GCM);

        final JWT jwt = new PlainJWT(buildClaims());
        val token = config.encrypt(jwt);
        val encryptedJwt = (EncryptedJWT) JWTParser.parse(token);
        val config2 = new RSAEncryptionConfiguration();
        config2.setAlgorithm(JWEAlgorithm.RSA_OAEP);
        config2.setMethod(EncryptionMethod.A128GCM);
        TestsHelper.expectException(() -> config2.decrypt(encryptedJwt), TechnicalException.class, "privateKey cannot be null");
    }
Tests {@link RSAEncryptionConfiguration}.

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