private static WAL.Entry generateEdit(int i, RegionInfo hri, TableName tableName, byte[] row,
    int columnCount, long timestamp, MultiVersionConcurrencyControl mvcc) {
    WALKeyImpl key = new WALKeyImpl(hri.getEncodedNameAsBytes(), tableName, i, timestamp,
      HConstants.DEFAULT_CLUSTER_ID, mvcc);
    WALEdit edit = new WALEdit();
    int prefix = i;
    IntStream.range(0, columnCount).mapToObj(j -> toValue(prefix, j))
      .map(value -> new KeyValue(row, row, row, timestamp, value))
      .forEachOrdered(c -> WALEditInternalHelper.addExtendedCell(edit, c));
    return new WAL.Entry(key, edit);
  }
Helper class for testing protobuf log.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogTestHelper.java