@Test
  public void testRandomAccessAesGcm() throws Exception {
    byte[] ikm = Hex.decode("000102030405060708090a0b0c0d0e0f");
    byte[] associatedData = Hex.decode("aabbccddeeff");
    int keySize = 16;
    int segmentSize = 503;
    int plaintextSize = 7654;
    AesGcmHkdfStreaming ags = new AesGcmHkdfStreaming(ikm, "HmacSha256", keySize, segmentSize, 0);
    testRandomAccessDecryption(ags, associatedData, plaintextSize);
  }
Test for thread safety using SeekableByteChannels. This test is an incorrect use case for
StreamingAead implementations, since SeekableByteChannels can't be used in multiple threads.
I.e. an implementation cannot guarantee that no other thread modifies the stream between a call
to SeekableByteChannel.position(long) and SeekableByteChannel.read(ByteBuffer). Therefore, the
test here only checks whether the operations are atomic. E.g. a read should read contiuous
bytes.
java_src/src/test/java/com/google/crypto/tink/subtle/StreamingAeadThreadSafetyTest.java