### Question:
BlueBioLemmatizer extends JCasAnnotator_ImplBase { @Override public void process(JCas jCas) throws AnalysisEngineProcessException { for (Token t : JCasUtil.select(jCas, Token.class)) { String pos = BlueCasUtil.getSinglePosTag(t); String lemma = lemmatize(t.getCoveredText(), pos); if (lemma != null) t.setLemmaStr(lemma); } }  @Override void process(JCas jCas); synchronized static String lemmatize(String text, String posTag);  }### Answer:
@Test public void test() throws Exception { String[] expected = StringUtils.split( "long form pressure hydrocephalus (NPH) be classify", " "); JCas jCas = getTokenizedTestCas( "longs forms pressure hydrocephalus (NPH) was classifying"); AnalysisEngine ae = createEngine(BlueBioLemmatizer.class); ae.process(jCas); Collection<Token> a = select(jCas, Token.class); assertEquals(7, a.size()); int i = 0; for (Token t : a) { assertNotNull(t.getLemmaStr()); LOG.debug("{} --> {}", t.getCoveredText(), t.getLemmaStr()); assertEquals(expected[i++], t.getLemmaStr()); } }