}
protected void runRuleTest(String text, Integer[] tokenIndexes, Integer[] tokenLen) {
StringCharacterScanner scanner = new StringCharacterScanner(text);
FullPatternRule fpRule = new FullPatternRule(new Token(null), sequences, new SampleJavaWordDetector());
while (scanner.peekNext() != ICharacterScanner.EOF) {
int beginOffset = scanner.textOffset;
IToken token = fpRule.evaluate(scanner);
if(token.isUndefined()) {
assertTrue(scanner.textOffset == beginOffset);
assertTrue(ArrayUtil.contains(tokenIndexes, beginOffset) == false);
scanner.read(); // advance
} else {