@Test
  public void decrypt_failsWithNullCiphertext() throws GeneralSecurityException {
    HpkePublicKey recipientPublicKey = getPublicKey(getDefaultValidParams());
    HpkePrivateKey recipientPrivateKey = getPrivateKey(recipientPublicKey);
    HybridDecrypt hpkeDecrypt = HpkeDecrypt.create(recipientPrivateKey);

    byte[] contextInfo = Random.randBytes(100);
    byte[] nullCiphertext = null;

    assertThrows(
        NullPointerException.class, () -> hpkeDecrypt.decrypt(nullCiphertext, contextInfo));
  }
Unit tests for {@link HpkeEncrypt} and {@link HpkeDecrypt}.
java_src/src/test/java/com/google/crypto/tink/hybrid/internal/HpkeEncryptDecryptTest.java