Token token2 = new Token(jcas, 3, 4);
token2.addToIndexes();
token2.addToIndexes();
Sentence sentence1 = new Sentence(jcas, 1, 2);
sentence1.addToIndexes();
// index2 is a set index, so even when adding a sentence twice, only one remains in the index
Sentence sentence2 = new Sentence(jcas, 3, 4);
sentence2.addToIndexes();
sentence2.addToIndexes();