@Test
  public void testTruncatedCiphertext() throws Exception {
    Assume.assumeTrue(!TinkFips.useOnlyFips() || TinkFipsUtil.fipsModuleAvailable());

    byte[] aad = generateAad();
    byte[] key = Random.randBytes(16);
    byte[] message = new byte[0];
    InsecureNonceAesGcmJce gcm = new InsecureNonceAesGcmJce(key);
    byte[] iv = Random.randBytes(InsecureNonceAesGcmJce.IV_SIZE_IN_BYTES);

    byte[] ciphertext = gcm.encrypt(iv, message, aad);
    byte[] truncatedCiphertext = Arrays.copyOf(ciphertext, ciphertext.length - 1);

    assertThrows(GeneralSecurityException.class, () -> gcm.decrypt(iv, truncatedCiphertext, aad));
  }
BC had a bug, where GCM failed for messages of size > 8192
java_src/src/test/java/com/google/crypto/tink/aead/internal/InsecureNonceAesGcmJceTest.java