// Note: the API of TextToken changed ... from startIndex/endIndex to offset/length.
// Rather than change *all* the tests, we'll just adjust here.
protected void assertTextToken(TemplateToken token, int startIndex, int endIndex)
{
TextToken t = (TextToken) token;
int expectedLength = endIndex - startIndex + 1;
assertEquals("Text token type.", TokenType.TEXT, t.getType());
assertEquals("Text token start index.", startIndex, t.getOffset());
assertEquals("Text token end index.", expectedLength, t.getLength());
}