@Test
  public void verifyBulkLoadEvent() throws IOException {
    TableName tableName = TableName.valueOf("test", "test");
    List<Pair<byte[], String>> familyPaths = withFamilyPathsFor(family1);
    byte[] familyName = familyPaths.get(0).getFirst();
    String storeFileName = familyPaths.get(0).getSecond();
    storeFileName = (new Path(storeFileName)).getName();
    List<String> storeFileNames = new ArrayList<>();
    storeFileNames.add(storeFileName);
    when(log.appendMarker(any(), any(),
      argThat(bulkLogWalEdit(WALEdit.BULK_LOAD, tableName.toBytes(), familyName, storeFileNames))))
      .thenAnswer(new Answer() {
        @Override
        public Object answer(InvocationOnMock invocation) {
          WALKeyImpl walKey = invocation.getArgument(1);
          MultiVersionConcurrencyControl mvcc = walKey.getMvcc();
          if (mvcc != null) {
            MultiVersionConcurrencyControl.WriteEntry we = mvcc.begin();
            walKey.setWriteEntry(we);
          }
          return 01L;
        }
      });
    testRegionWithFamiliesAndSpecifiedTableName(tableName, family1).bulkLoadHFiles(familyPaths,
      false, null);
    verify(log).sync(anyLong());
  }
This class attempts to unit test bulk HLog loading.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestBulkLoad.java