@Override
      public long writeTo(WritableByteChannel channel) throws IOException {
        ByteBuffer bufferToWrite = buffers.get(index);
        index++;
        int savedPos = bufferToWrite.position();
        long written = channel.write(bufferToWrite);
        bufferToWrite.position(savedPos);
        return written;
      }
Implementation of {@link ConnectedChannel} that fetches message infos or blobs based on the type of request.
ambry-replication/src/test/java/com/github/ambry/replication/MockConnectionPool.java