@Test
public void testCanUseFromNamedAnalyzer() throws IOException {
ComboAnalyzer cb = new ComboAnalyzer(TEST_VERSION_CURRENT, new WhitespaceAnalyzer(TEST_VERSION_CURRENT));
NamedAnalyzer namedAnalyzer = new NamedAnalyzer("name", AnalyzerScope.INDEX, cb);
for (int i = 0 ; i < 3 ; i++)
assertTokenStreamContents(namedAnalyzer.tokenStream("field", new StringReader("just a little test " + i)),
new String[]{"just", "a", "little", "test", Integer.toString(i)},
new int[]{ 0, 5, 7, 14, 19},
new int[]{ 4, 6, 13, 18, 20},
new int[]{ 1, 1, 1, 1, 1});
}