NodeState root = mock(NodeState.class);
when(root.getNames(any(String.class))).thenReturn(Collections.<String>emptySet());
SelectorImpl selector = new SelectorImpl(root, "a");
SolrServer solrServer = mock(SolrServer.class);
OakSolrConfiguration configuration = new DefaultSolrConfiguration();
SolrQueryIndex solrQueryIndex = new SolrQueryIndex("solr", solrServer, configuration);
FilterImpl filter = new FilterImpl(selector, "select * from [nt:base] as a where jcr:primaryType = 'nt:unstructured')", new QueryEngineSettings());
filter.restrictProperty("jcr:primaryType", Operator.EQUAL, PropertyValues.newString("nt:unstructured"));
double cost = solrQueryIndex.getCost(filter, root);