### Question:
DirectoryWalker { public ImmutableList<Path> walk(PathConsumer pathConsumer) throws IOException { ImmutableList<Path> files = walk(); for (Path path : files) { pathConsumer.accept(path); } return files; } DirectoryWalker(Path rootDir); DirectoryWalker filter(Predicate<Path> pathFilter); DirectoryWalker filterRoot(); ImmutableList<Path> walk(PathConsumer pathConsumer); ImmutableList<Path> walk();  }### Answer:
@Test public void testWalk() throws IOException { new DirectoryWalker(testDir).walk(addToWalkedPaths); Set<Path> expectedPaths = new HashSet<>( Arrays.asList( testDir, testDir.resolve("a"), testDir.resolve("a").resolve("b"), testDir.resolve("a").resolve("b").resolve("bar"), testDir.resolve("c"), testDir.resolve("c").resolve("cat"), testDir.resolve("foo"))); Assert.assertEquals(expectedPaths, walkedPaths); }