@Override
    public void run() {
      try {
        byte[] chunk = new byte[chunkSize];
        for (int i = 0; i < chunkSize; i++) {
          chunk[i] = plaintextByte;
        }
        for (int i = 0; i < numberOfChunks; i++) {
          int written = channel.write(ByteBuffer.wrap(chunk));
          assertEquals(written, chunkSize);
        }
      } catch (IOException ex) {
        getUncaughtExceptionHandler().uncaughtException(this, ex);
      }
    }
Write the plaintext to the channel. This implementation assumes that the channel is blocking
and throws an AssertionError if an attempt to write plaintext to the channel is incomplete.
java_src/src/test/java/com/google/crypto/tink/subtle/StreamingAeadThreadSafetyTest.java