CopyFileVisitor implements FileVisitor<Path> { @Override public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { return FileVisitResult.CONTINUE; } CopyFileVisitor(File fromFolder, File targetFolder);  CopyFileVisitor(File fromFolder, File targetFolder, Boolean ignoreHiddenFiles, Boolean ignoreHiddenFolders);  CopyFileVisitor(File fromFolder, File targetFolder, Boolean ignoreHiddenFiles, Boolean ignoreHiddenFolders,
                         PathMatcher exclusionMatcher); void setExclusions(List<Path> exclusions); @Override FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs); @Override FileVisitResult visitFile(Path file, BasicFileAttributes attrs); @Override FileVisitResult visitFileFailed(Path file, IOException exc); @Override FileVisitResult postVisitDirectory(Path dir, IOException exc);  }
@Test public void postVisitDirectory() throws IOException { CopyFileVisitor visitor = new CopyFileVisitor(fromFolder, targetFolder); FileVisitResult fileVisitResult = visitor.postVisitDirectory(fromFolder.toPath(), new IOException()); assertThat(fileVisitResult, is(CONTINUE)); }