@Test
  public void testNullPlaintextOrCiphertext() throws Exception {
    Assume.assumeFalse(TinkFips.useOnlyFips());

    InsecureNonceChaCha20Poly1305 cipher =
        createInstance(Random.randBytes(KEY_SIZE_IN_BYTES));
    byte[] nonce = Random.randBytes(NONCE_SIZE_IN_BYTES);
    byte[] aad = new byte[] {1, 2, 3};
    assertThrows(
        NullPointerException.class,
        () -> {
          byte[] unused = cipher.encrypt(nonce, null, aad);
        });
    assertThrows(
        NullPointerException.class,
        () -> {
          byte[] unused = cipher.encrypt(nonce, null, null);
        });
    assertThrows(
        NullPointerException.class,
        () -> {
          byte[] unused = cipher.decrypt(nonce, null, aad);
        });
    assertThrows(
        NullPointerException.class,
        () -> {
          byte[] unused = cipher.decrypt(nonce, null, null);
        });
  }
BC had a bug, where GCM failed for messages of size > 8192
java_src/src/test/java/com/google/crypto/tink/aead/internal/InsecureNonceChaCha20Poly1305Test.java