private void testAdvancetHasSameRow(CellScanner scanner, final KeyValue kv) throws IOException {
    scanner.advance();
    assertTrue(Bytes.equals(scanner.current().getRowArray(), scanner.current().getRowOffset(),
      scanner.current().getRowLength(), kv.getRowArray(), kv.getRowOffset(), kv.getRowLength()));
  }
Little test to check we can basically convert list of a list of KVs into a CellScanner
hbase-server/src/test/java/org/apache/hadoop/hbase/protobuf/TestReplicationProtobuf.java