@Override
  public int appendFrom(ByteBuffer buffer) {
    int toWrite = buffer.remaining();
    buf.put(buffer);
    return toWrite;
  }
@param size the size of the buffer that will receive writes
ambry-api/src/test/java/com/github/ambry/store/MockWrite.java