LikelihoodAssignmentAnnotator extends JCasAnnotator_ImplBase { @Override public void process(JCas aJCas) throws AnalysisEngineProcessException { assignLikelihood(aJCas); }  void initialize(UimaContext aContext); @Override void process(JCas aJCas); @SuppressWarnings("rawtypes") void buildTreeMaps(JCas aJCas);  }
@Test @SuppressWarnings({ "rawtypes"}) public void testProcess() throws ResourceInitializationException, IOException, InvalidXMLException { XMLInputSource assignmentXML = null; ResourceSpecifier assignmentSpec = null; AnalysisEngine assignmentAnnotator = AnalysisEngineFactory.createEngine(DESCRIPTOR); JCas aJCas = null; try { aJCas = assignmentAnnotator.newJCas(); } catch (ResourceInitializationException e) { LOGGER.error("testProcess()", e); } initCas(aJCas); try { assignmentAnnotator.process(aJCas); } catch (Exception e) { LOGGER.error("testProcess()", e); } JFSIndexRepository indexes = aJCas.getJFSIndexRepository(); Iterator conceptIter = indexes.getAnnotationIndex( ConceptMention.type).iterator(); String prediction = getPredictedAssignments(conceptIter); LOGGER.debug("testProcess() - Predicted Concept-Likelihood-Assignments: " + prediction); LOGGER.debug("testProcess() - Wanted Concept-Likelihood-Assignments: " + TEST_ASSIGNMENT); assertEquals(TEST_ASSIGNMENT, prediction); }