@Override
 public void close() {
   // We only attempt to check open/closed state if there were no other test
   // failures.
   try {
     if (failureMarker.wasSuccessful() && dir.isOpen()) {
       Assert.fail("Directory not closed: " + dir);
     }
   } finally {
     // TODO: perform real close of the delegate: LUCENE-4058
     // dir.close();
   }
 }
 /** Taints this object and any chained as having failures. */
 public void markFailed() {
   failures = true;
   for (TestRuleMarkFailure next : chained) {
     next.markFailed();
   }
 }