private void assertQuery(IndexTracker tracker, NodeState indexed, String key, String value){
QueryIndex queryIndex = new LuceneIndex(tracker, analyzer, null);
FilterImpl filter = createFilter(NT_BASE);
filter.restrictPath("/", Filter.PathRestriction.EXACT);
filter.restrictProperty(key, Operator.EQUAL,
PropertyValues.newString(value));
Cursor cursor = queryIndex.query(filter, indexed);
assertTrue(cursor.hasNext());
assertEquals("/", cursor.next().getPath());
assertFalse(cursor.hasNext());