code: static RSAKeyProvider providerForKeys(final RSAPublicKey publicKey, final RSAPrivateKey privateKey) {
          if (publicKey == null && privateKey == null) {
              throw new IllegalArgumentException("Both provided Keys cannot be null.");
          }
          return new RSAKeyProvider() {
              @Override
              public RSAPublicKey getPublicKeyById(String keyId) {
                  return publicKey;
              }
  
              @Override
              public RSAPrivateKey getPrivateKey() {
                  return privateKey;
              }
  
              @Override
              public String getPrivateKeyId() {
                  return null;
              }
          };
      }
docs: Visible for testing