final URIDecodingFilter filter = new URIDecodingFilter(t, encoding);
for (int i = 0; i < expectedStems.length; i++) {
assertTrue("token " + i + " exists", filter.incrementToken());
assertEquals(expectedStems[i], termAtt.toString());
if (expectedTypes == null)
assertEquals(uritype, typeAtt.type());
else
assertEquals(expectedTypes[i], typeAtt.type());
if (expectedPosIncr != null)
assertEquals(expectedPosIncr[i], posIncrAtt.getPositionIncrement());
}