* Tests the getChildrenNames() method.
*/
public void testGetChildrenNames()
throws Exception
{
CacheLoader loader = loaderTL.get();
checkChildren(Fqn.ROOT, null);
checkChildren(Fqn.fromString("/key0"), null);
loader.put(Fqn.fromString("/key0"), null);
addDelay();
checkChildren(Fqn.ROOT, new String[]{"key0"});
loader.put(Fqn.fromString("/key1/x"), null);
addDelay();
checkChildren(Fqn.ROOT, new String[]{"key0", "key1"});
checkChildren(Fqn.fromString("/key1"), new String[]{"x"});
loader.remove(Fqn.fromString("/key1/x"));
addDelay();
checkChildren(Fqn.ROOT, new String[]{"key0", "key1"});
checkChildren(Fqn.fromString("/key0"), null);
checkChildren(Fqn.fromString("/key1"), null);
loader.put(Fqn.fromString("/key0/a"), null);
loader.put(Fqn.fromString("/key0/ab"), null);
loader.put(Fqn.fromString("/key0/abc"), null);
addDelay();
checkChildren(Fqn.fromString("/key0"),
new String[]{"a", "ab", "abc"});
loader.put(Fqn.fromString("/key0/xxx"), null);
loader.put(Fqn.fromString("/key0/xx"), null);
loader.put(Fqn.fromString("/key0/x"), null);
addDelay();
checkChildren(Fqn.fromString("/key0"),
new String[]{"a", "ab", "abc", "x", "xx", "xxx"});
loader.put(Fqn.fromString("/key0/a/1"), null);
loader.put(Fqn.fromString("/key0/a/2"), null);
loader.put(Fqn.fromString("/key0/a/2/1"), null);
addDelay();
checkChildren(Fqn.fromString("/key0/a/2"), new String[]{"1"});
checkChildren(Fqn.fromString("/key0/a"), new String[]{"1", "2"});
checkChildren(Fqn.fromString("/key0"),
new String[]{"a", "ab", "abc", "x", "xx", "xxx"});