}
public void testQuery() throws Exception {
TextQueryResolver res = new TextQueryResolver();
NodeSet set = res.query(collection, "test1:test", null, null);
int count = 0;
while (set.hasMoreNodes()) {
set.getNextNode();
count++;
}
assertEquals("Number of elements in a result", 3, count);
collection.remove("key1");
set = res.query(collection, "test1:test", null, null);
count = 0;
while (set.hasMoreNodes()) {
set.getNextNode();
count++;
}
assertEquals("Number of elements in a result", 2, count);
}