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

        final JWT jwt = new PlainJWT(buildClaims());
        TestsHelper.expectException(() -> config.encrypt(jwt), TechnicalException.class, "publicKey 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