private WALEdit getBulkLoadWALEdit(NavigableMap<byte[], Integer> scope) {
    // 1. Create store files for the families
    Map<byte[], List<Path>> storeFiles = new HashMap<>(1);
    Map<String, Long> storeFilesSize = new HashMap<>(1);
    List<Path> p = new ArrayList<>(1);
    Path hfilePath1 = new Path(Bytes.toString(F1));
    p.add(hfilePath1);
    storeFilesSize.put(hfilePath1.getName(), 0L);
    storeFiles.put(F1, p);
    scope.put(F1, 1);
    p = new ArrayList<>(1);
    Path hfilePath2 = new Path(Bytes.toString(F2));
    p.add(hfilePath2);
    storeFilesSize.put(hfilePath2.getName(), 0L);
    storeFiles.put(F2, p);
    // 2. Create bulk load descriptor
    BulkLoadDescriptor desc = ProtobufUtil.toBulkLoadDescriptor(RI.getTable(),
      UnsafeByteOperations.unsafeWrap(RI.getEncodedNameAsBytes()), storeFiles, storeFilesSize, 1);

    // 3. create bulk load wal edit event
    WALEdit logEdit = WALEdit.createBulkLoadEvent(RI, desc);
    return logEdit;
  }
Test for HBASE-9038, Replication.scopeWALEdits would NPE if it wasn't filtering out the
compaction WALEdit.
hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationWALEdits.java