tree.addChild("afoldernode").setProperty("jcr:primaryType", "nt:folder");
tree.addChild("anothersamplenode").setProperty("jcr:primaryType", "nt:unstructured");
root.commit();
QueryIndex index = new SolrQueryIndex("solr", server, configuration);
SelectorImpl selector = mock(SelectorImpl.class);
Set<String> primaryTypes = new HashSet<String>();
primaryTypes.add("nt:folder");
when(selector.getPrimaryTypes()).thenReturn(primaryTypes);
FilterImpl filter = new FilterImpl(selector, "select * from [nt:folder]");
Cursor cursor = index.query(filter, store.getRoot());
assertNotNull(cursor);
assertTrue(cursor.hasNext());
assertEquals("/afoldernode", cursor.next().getPath());