@Override
  public HpkeKemEncapOutput encapsulate(byte[] recipientPublicKey) throws GeneralSecurityException {
    KeyPair keyPair = EllipticCurves.generateKeyPair(curve);
    return encapsulate(recipientPublicKey, keyPair);
  }
Helper function factored out to facilitate unit testing.
java_src/src/main/java/com/google/crypto/tink/hybrid/internal/NistCurvesHpkeKem.java