public ByteBuffer getBuffer() {
    ByteBuffer ret = buf.duplicate();
    ret.flip();
    return ret;
  }
@return the buffer that is used for the writes. The buffer returned is a duplicate of the buffer being used for
writes so all data changes will reflect in both buffers.
ambry-api/src/test/java/com/github/ambry/store/MockWrite.java