@Override
    public int read() {
      while (currentBufferIndex < buffers.size()) {
        ByteBuffer currentBuffer = buffers.get(currentBufferIndex);
        if (currentBuffer.hasRemaining()) {
          return currentBuffer.get() & 0xFF; // Read a byte and convert to an unsigned int
        }
        currentBufferIndex++;
      }
      return -1; // End of stream
    }
A mock implementation of {@link MessageWriteSet} to help write to a {@link Store} and simulate cases where
IOException occurred.
ambry-store/src/test/java/com/github/ambry/store/MockMessageWriteSet.java