### Question:
IrodsVisitedComposite extends IrodsFileItem implements HierComposite { @Override public boolean accept(final HierVisitor visitor) throws JargonException { log.info("accept()"); if (visitor == null) { throw new IllegalArgumentException("null visitor"); } log.debug("check if enter at:{}", getAbsolutePath()); boolean visitorEntered = visitor.visitEnter(this); if (visitorEntered) { log.debug("entering..."); for (File file : this.listFiles()) { if (file.isDirectory()) { IrodsVisitedComposite child = new IrodsVisitedComposite((IRODSFileImpl) file); if (!child.accept(visitor)) { log.info("child doesn't accept, short circuit rest of siblings at:{}", child.getAbsolutePath()); break; } } else { IrodsVisitedLeaf leaf = new IrodsVisitedLeaf((IRODSFileImpl) file); if (!leaf.accept(visitor)) { log.info("child doesn't accept, short circuit rest of siblings at:{}", leaf.getAbsolutePath()); break; } } } } log.debug("done with children..."); return visitor.visitLeave(this, visitorEntered); } IrodsVisitedComposite(final String pathName, final IRODSFileSystemAO irodsFileSystemAO);  IrodsVisitedComposite(final String parent, final String child, final IRODSFileSystemAO irodsFileSystemAO);  IrodsVisitedComposite(final File parent, final String child, final IRODSFileSystemAO irodsFileSystemAO);  IrodsVisitedComposite(final IRODSFileImpl irodsFile); @Override boolean accept(final HierVisitor visitor); static final Logger log; }### Answer:
@Test public void testAcceptAndCrawl() throws Exception { String rootCollection = "testAcceptAndCrawl"; String localCollectionAbsolutePath = scratchFileUtils .createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH + '/' + rootCollection); String irodsCollectionRootAbsolutePath = testingPropertiesHelper .buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH); FileGenerator.generateManyFilesAndCollectionsInParentCollectionByAbsolutePath(localCollectionAbsolutePath, "testPutThenGetMultipleCollectionsMultipleFiles", 2, 3, 2, "testFile", ".txt", 3, 2, 1, 2); IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); IRODSFileSystem irodsFileSystem = IRODSFileSystem.instance(); IRODSFileFactory irodsFileFactory = irodsFileSystem.getIRODSFileFactory(irodsAccount); IRODSFile destFile = irodsFileFactory.instanceIRODSFile(irodsCollectionRootAbsolutePath); DataTransferOperations dataTransferOperationsAO = irodsFileSystem.getIRODSAccessObjectFactory() .getDataTransferOperations(irodsAccount); File localFile = new File(localCollectionAbsolutePath); dataTransferOperationsAO.putOperation(localFile, destFile, null, null); IRODSFileImpl irodsFile = (IRODSFileImpl) destFile; IrodsVisitedComposite composite = new IrodsVisitedComposite(irodsFile); TestIndexVisitor visitor = new TestIndexVisitor(irodsFileSystem.getIRODSAccessObjectFactory(), irodsAccount); composite.accept(visitor); NodeVisitLog log = visitor.getNodeVisitLog(); Assert.assertFalse("no log entries", log.getLogEntries().isEmpty()); }