@Test
  public void testHFileLinkEmptyBackReferenceDirectory() throws Exception {
    // simulate and remove the back reference
    fs.delete(linkBackRef, false);
    assertTrue("back reference directory still exists", fs.exists(linkBackRefDir));
    cleaner.chore();
    assertFalse("back reference directory should be deleted", fs.exists(linkBackRefDir));
  }
Test the HFileLink Cleaner. HFiles with links cannot be deleted until a link is present.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestHFileLinkCleaner.java