### Question:
FilesystemWorkspace implements Workspace { @Override public void walk(File basedir, final FileVisitor visitor) throws IOException { if (!basedir.exists()) { return; } final Path basepath = basedir.toPath(); Files.walkFileTree(basepath, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException { final File file = path.toFile(); final long lastModified = file.lastModified(); final long length = file.length(); visitor.visit(file, lastModified, length, ResourceStatus.NEW); return FileVisitResult.CONTINUE; } }); }  @Override Mode getMode(); @Override Workspace escalate(); @Override void deleteFile(File file); @Override void processOutput(File outputFile); @Override OutputStream newOutputStream(File file); @Override ResourceStatus getResourceStatus(File file, long lastModified, long length); @Override boolean isPresent(File file); @Override boolean isRegularFile(File file); @Override boolean isDirectory(File file); @Override void walk(File basedir, final FileVisitor visitor);  }### Answer:
@Test public void testWalkFile() throws Exception { File basefile = temp.newFile(); List<File> files = new ArrayList<>(); new FilesystemWorkspace().walk(basefile, (file, lastModified, length, status) -> files.add(file)); assertThat(files).containsOnly(basefile); }