@Test
public void testVikings() throws Exception {
String[] gold = {"Last", "week", "the", "National", "Football", "League", "crowned", "a", "new", "Super", "Bowl", "Champion",
"Minnesota", "Vikings", "fans", "will", "take", "little", "solace", "in", "the", "fact", "that", "they",
"lost", "to", "the", "eventual", "champion", "in", "the", "playoffs"};
StandardTokenizer tokenizer = new StandardTokenizer(Version.LUCENE_36, new StringReader("Last week the National Football League crowned a new Super Bowl Champion." +
" Minnesota Vikings fans will take little solace in the fact that they" +
" lost to the eventual champion in the playoffs."));
List<String> result = new ArrayList<String>();
while (tokenizer.incrementToken()) {
result.add(((CharTermAttribute) tokenizer.getAttribute(CharTermAttribute.class)).toString());
}
assertTrue("result Size: " + result.size() + " is not: " + gold.length, result.size() == gold.length);
int i = 0;
for (String chunk : result) {
System.out.println(chunk);