@Test
  public void testSameNonce() throws Exception {
    byte[] key = Random.randBytes(KEY_SIZE_IN_BYTES);
    InsecureNonceXChaCha20Poly1305 cipher = new InsecureNonceXChaCha20Poly1305(key);
    byte[] message = new byte[0];
    byte[] aad = new byte[0];
    byte[] nonce = Random.randBytes(24);

    byte[] ct = cipher.encrypt(nonce, message, aad);
    byte[] ct2 = cipher.encrypt(nonce, message, aad);
    byte[] pt = cipher.decrypt(nonce, ct, aad);
    byte[] pt2 = cipher.decrypt(nonce, ct, aad);

    assertArrayEquals(ct, ct2);
    assertArrayEquals(pt, pt2);
  }
This test simply checks that the same nonce for a given input produces the same output.
java_src/src/test/java/com/google/crypto/tink/aead/internal/InsecureNonceXChaCha20Poly1305Test.java