@Override
  public void write(int b) throws IOException {
    stream.write(b);
    pos += 1;
    writeBytes.increment();
    writeOperations.increment();
  }
@Test
  public void testWrite() {
    // Run tests for both byte and array write paths
    Stream.of(true, false)
        .forEach(
            arrayWrite -> {
              // Test small file write
              writeAndVerify(storage, randomBlobId(), randomData(1024), arrayWrite);

              // Test large file
              writeAndVerify(storage, randomBlobId(), randomData(10 * 1024 * 1024), arrayWrite);
            });
  }