private void deleteSnapshotWithAclAndVerify(AclFeature aclFeature, Path pathToCheckAcl, int totalAclFeatures) throws IOException { hdfs.deleteSnapshot(path, snapshotName); AclFeature afterDeleteAclFeature = FSAclBaseTest.getAclFeature( pathToCheckAcl, cluster); assertSame(aclFeature, afterDeleteAclFeature); assertEquals("Reference count should remain same" + " even after deletion of snapshot", 1, afterDeleteAclFeature.getRefCount()); hdfs.removeAcl(pathToCheckAcl); assertEquals("Reference count should be 0", 0, aclFeature.getRefCount()); assertEquals("Unique ACL features should remain same", totalAclFeatures, AclStorage.getUniqueAclFeatures().getUniqueElementsSize()); }