### Question:
IrodsVisitedLeaf extends IrodsFileItem implements HierLeaf { @Override public boolean accept(final HierVisitor visitor) throws JargonException { return visitor.visit(this); } IrodsVisitedLeaf(final String pathName, final IRODSFileSystemAO irodsFileSystemAO);  IrodsVisitedLeaf(final String parent, final String child, final IRODSFileSystemAO irodsFileSystemAO);  IrodsVisitedLeaf(final File parent, final String child, final IRODSFileSystemAO irodsFileSystemAO);  IrodsVisitedLeaf(final IRODSFileImpl irodsFile); @Override boolean accept(final HierVisitor visitor);  }### Answer:
@Test public void testAccept() throws Exception { String testFileName = "testAccept.dat"; String absPath = scratchFileUtils.createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH); String localFileName = FileGenerator.generateFileOfFixedLengthGivenName(absPath, testFileName, 10); IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); String targetIrodsCollection = testingPropertiesHelper .buildIRODSCollectionAbsolutePathFromTestProperties(testingProperties, IRODS_TEST_SUBDIR_PATH); String dataObjectAbsPath = targetIrodsCollection + '/' + testFileName; DataTransferOperations dto = irodsFileSystem.getIRODSAccessObjectFactory() .getDataTransferOperations(irodsAccount); dto.putOperation(localFileName, targetIrodsCollection, irodsAccount.getDefaultStorageResource(), null, null); IRODSFileImpl irodsFile = (IRODSFileImpl) irodsFileSystem.getIRODSFileFactory(irodsAccount) .instanceIRODSFile(dataObjectAbsPath); IrodsVisitedLeaf leaf = new IrodsVisitedLeaf(irodsFile); TestIndexVisitor visitor = new TestIndexVisitor(irodsFileSystem.getIRODSAccessObjectFactory(), irodsAccount); leaf.accept(visitor); NodeVisitLog log = visitor.getNodeVisitLog(); Assert.assertFalse("no log entries", log.getLogEntries().isEmpty()); NodeVisitLogEntry actual = log.getLogEntries().get(0); Assert.assertEquals(VisitTypeEnum.VISIT_LEAF, actual.getVisitType()); }