EditorHook hook = new EditorHook(provider);
NodeState indexed = hook.processCommit(before, after);
IndexDefinition testDef = new IndexDefinitionImpl("solr",
"solr", "/oak:index/solr");
QueryIndex queryIndex = new SolrQueryIndex(testDef, server, configuration);
FilterImpl filter = new FilterImpl(null, null);
filter.restrictPath("newnode", Filter.PathRestriction.EXACT);
filter.restrictProperty("prop", Operator.EQUAL,
PropertyValues.newString("val"));
Cursor cursor = queryIndex.query(filter, indexed);
assertNotNull(cursor);
assertTrue("no results found", cursor.hasNext());
IndexRow next = cursor.next();
assertNotNull("first returned item should not be null", next);
assertEquals("newnode", next.getPath());