private HpkePrivateKey getPrivateKey(HpkePublicKey publicKey) throws GeneralSecurityException {
    return HpkePrivateKey.create(
        publicKey, SecretBytes.copyFrom(privateKeyBytes, InsecureSecretKeyAccess.get()));
  }
Unit tests for {@link HpkeEncrypt} and {@link HpkeDecrypt}.
java_src/src/test/java/com/google/crypto/tink/hybrid/internal/HpkeEncryptDecryptTest.java