PhraseTable.Phrase p = phraseTable.lookupNormalized("COL.");
assertEquals("Col.", p.getText());
}
public void testIterator() throws Exception {
PhraseTable phraseTable = new PhraseTable();
phraseTable.caseInsensitive = true;
phraseTable.addPhrases(phrases);
Set<String> origPhrases = new HashSet<String>();
origPhrases.addAll(phrases);
Set<String> iteratedPhrases = new HashSet<String>();
Iterator<PhraseTable.Phrase> iterator = phraseTable.iterator();
while (iterator.hasNext()) {
iteratedPhrases.add(iterator.next().getText());
}
Set<String> intersection = CollectionUtils.intersection(origPhrases, iteratedPhrases);
Collection<String> inOrigNotInIterated = CollectionUtils.diff(origPhrases, intersection);