  @Test
  public void testListFiles() throws IllegalArgumentException, IOException {

    assertEquals(0, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmq/t"), false, false).size());
    assertEquals(0, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmq/t"), false, false).size());
    assertEquals(0, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmq/t"), true, false).size());
    assertEquals(0, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmq/t"), true, true).size());
    assertEquals(0, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmp/t"), false, false).size());
    assertEquals(0, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmp/t"), false, false).size());
    assertEquals(11, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmp/t"), true, false).size());
    assertEquals(8, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmp/t"), true, true).size());
    assertEquals(1, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmp/t/t1"), false, false).size());
    assertEquals(1, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmp/t/t1"), true, false).size());
    assertEquals(1, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmp/t/t1"), true, true).size());
    assertEquals(1, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmp/t/t3"), false, false).size());
    assertEquals(1, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmp/t/t3"), true, false).size());
    assertEquals(0, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmp/t/t3"), true, true).size());
    assertEquals(2, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmp/t/t6"), false, false).size());
    assertEquals(2, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmp/t/t6"), true, false).size());
    assertEquals(1, DfsUtil.listFiles(dfsServer.getFileSystem(), dfsServer.getPath("/tmp/t/t6"), true, true).size());
  }