@Test
public void testCASConsumer() {
try {
/* create Solrcas tester */
AnnotatorTester annotatorTester = new AnnotatorTester("src/test/resources/TestSolrcasAE.xml");
/* create a mock CAS */
CAS cas = getCAS();
cas.setDocumentText("Francesco Totti is the best football player");
cas.setDocumentLanguage("en");
AnnotationFS annotation = cas.createAnnotation(cas.getAnnotationType(), 0, 9);
cas.addFsToIndexes(annotation);
/* execute Solrcas on the created CAS*/
annotatorTester.performTest(cas);
/* 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();