head = mk.commit("/", "+ \"children\": { \"c1\": {\"p\": \"1\"}, \"c2\": {\"p\": \"1\"}, \"c3\": {\"p\": \"2\"}, \"c4\": {\"p\": \"3\"}}", head, "");
FilterImpl f = new FilterImpl(null, null);
f.setPath("/");
List<String> paths = new ArrayList<String>();
Cursor c = t.query(f, new KernelNodeState(mk, "/", head, cache));
while (c.hasNext()) {
paths.add(c.next().getPath());
}
Collections.sort(paths);
assertEquals(Arrays.asList(
"/", "/children", "/children/c1", "/children/c2",
"/children/c3", "/children/c4", "/parents",
"/parents/p0", "/parents/p1", "/parents/p2"),
paths);
assertFalse(c.hasNext());
// endure it stays false
assertFalse(c.hasNext());
f.setPath("/nowhere");
c = t.query(f, new KernelNodeState(mk, "/", head, cache));
assertFalse(c.hasNext());
// endure it stays false
assertFalse(c.hasNext());
}