/* create a Solr instance to check document has been indexed as expected */
URL solrURL = this.getClass().getResource("/org/apache/uima/solrcas/");
System.setProperty("solr.solr.home", new File(solrURL.toURI()).getAbsolutePath());
CoreContainer.Initializer initializer = new CoreContainer.Initializer();
CoreContainer coreContainer = initializer.initialize();
SolrServer solrServer = new EmbeddedSolrServer(coreContainer, "");
ModifiableSolrParams solrParams = new ModifiableSolrParams();
solrParams.add("q", "annotation:Francesco");
QueryResponse queryResponse = solrServer.query(solrParams);
/* check the result contains only one doc with 2 annotations of the mock CAS */
assertTrue(queryResponse != null);
SolrDocumentList results = queryResponse.getResults();
assertTrue(results.getNumFound() == 1);