NodeState indexed = HOOK.processCommit(before, after, CommitInfo.EMPTY);
IndexTracker tracker = new IndexTracker();
tracker.update(indexed);
QueryIndex queryIndex = new LuceneIndex(tracker, analyzer, null);
FilterImpl filter = createFilter(NT_BASE);
// filter.restrictPath("/", Filter.PathRestriction.EXACT);
filter.restrictProperty("foo", Operator.EQUAL,
PropertyValues.newString("bar"));
Cursor cursor = queryIndex.query(filter, indexed);
assertTrue(cursor.hasNext());
assertEquals("/a/b/c", cursor.next().getPath());
assertEquals("/a/b", cursor.next().getPath());
assertEquals("/a", cursor.next().getPath());