  @Test
  public void testListAllRecursiveWithFilter() throws IOException {

    List<FileStatus> statuses = FileSystemUtil.listAll(fs, new Path(base, "a"), true, new PathFilter() {
      @Override
      public boolean accept(Path path) {
        return path.getName().endsWith("a") || path.getName().endsWith(".txt");
      }
    });
    assertEquals("Directory and file count should match", 7, statuses.size());
  }