@Override
    public long writeTo(int index, WritableByteChannel channel, long relativeOffset, long maxSize) throws IOException {
      ByteBuffer bufferToWrite = buffers.get(index);
      int sizeToWrite = bufferToWrite.remaining();
      while (bufferToWrite.hasRemaining()) {
        channel.write(bufferToWrite);
      }
      return sizeToWrite;
    }
A mock implementation of {@link Store} that store all details in memory.
ambry-replication/src/test/java/com/github/ambry/replication/InMemoryStore.java