@Test
public void testGetChildrenExt()
    throws KeeperException, InterruptedException {

  if (zooKeeperExt == null) {
    System.out.println(
        "testGetChildrenExt: No prop.zookeeper.list set, skipping test");
    return;
  }
  zooKeeperExt.createExt(BASE_PATH,
                         null,
                         Ids.OPEN_ACL_UNSAFE,
                         CreateMode.PERSISTENT,
                         false);
  zooKeeperExt.createExt(BASE_PATH + "/b",
                         null,
                         Ids.OPEN_ACL_UNSAFE,
                         CreateMode.PERSISTENT_SEQUENTIAL,
                         false);
  zooKeeperExt.createExt(BASE_PATH + "/a",
                         null,
                         Ids.OPEN_ACL_UNSAFE,
                         CreateMode.PERSISTENT_SEQUENTIAL,
                         false);
  zooKeeperExt.createExt(BASE_PATH + "/d",
                         null,
                         Ids.OPEN_ACL_UNSAFE,
                         CreateMode.PERSISTENT_SEQUENTIAL,
                         false);
  zooKeeperExt.createExt(BASE_PATH + "/c",
                         null,
                         Ids.OPEN_ACL_UNSAFE,
                         CreateMode.PERSISTENT_SEQUENTIAL,
                         false);
  List<String> fullPathList =
      zooKeeperExt.getChildrenExt(BASE_PATH, false, false, true);
  for (String fullPath : fullPathList) {
    assertTrue(fullPath.contains(BASE_PATH + "/"));
  }
  List<String> sequenceOrderedList =
      zooKeeperExt.getChildrenExt(BASE_PATH, false, true, true);
  for (String fullPath : sequenceOrderedList) {
    assertTrue(fullPath.contains(BASE_PATH + "/"));
  }
  assertEquals(4, sequenceOrderedList.size());
  assertTrue(sequenceOrderedList.get(0).contains("/b"));
  assertTrue(sequenceOrderedList.get(1).contains("/a"));
  assertTrue(sequenceOrderedList.get(2).contains("/d"));
  assertTrue(sequenceOrderedList.get(3).contains("/c"));
}