}
@Test
public void testCreateFeatureTokens() throws Exception{
JCas cas = createCasWithText("token1 token2 token3");
Annotation1 annotation1 = new Annotation1(cas);
annotation1.setBegin(0);
annotation1.setEnd(6);
annotation1.setFeatureString("token1Feature1");
annotation1.addToIndexes();
Annotation1 annotation2 = new Annotation1(cas);
annotation2.setFeatureString("token2Feature1");
annotation2.setBegin(7);
annotation2.setEnd(13);
annotation2.addToIndexes();
Annotation1 annotation3 = new Annotation1(cas);
annotation3.setFeatureString("token3Feature1");
annotation3.setBegin(14);
annotation3.setEnd(20);
annotation3.addToIndexes();
AnnotationTokenStream annotationTokenStream = new AnnotationTokenStream(cas, CAS.NAME_DEFAULT_SOFA, "org.apache.uima.lucas.indexer.types.test.Annotation1", "featureString", null);
Token nextToken = annotationTokenStream.next();
assertNotNull(nextToken);
assertEquals("token1Feature1", new String(nextToken.termBuffer(), 0, nextToken.termLength()));