public virtual void TestOutputHangsOffEnd()
{
b = new SynonymMap.Builder(true);
const bool keepOrig = false;
// b hangs off the end (no input token under it):
Add("a", "a b", keepOrig);
tokensIn = new MockTokenizer(new StringReader("a"), MockTokenizer.WHITESPACE, true);
tokensIn.Reset();
assertTrue(tokensIn.IncrementToken());
assertFalse(tokensIn.IncrementToken());
tokensIn.End();
tokensIn.Dispose();
tokensOut = new SynonymFilter(tokensIn, b.Build(), true);
termAtt = tokensOut.AddAttribute<ICharTermAttribute>();
posIncrAtt = tokensOut.AddAttribute<IPositionIncrementAttribute>();
offsetAtt = tokensOut.AddAttribute<IOffsetAttribute>();
posLenAtt = tokensOut.AddAttribute<IPositionLengthAttribute>();
// Make sure endOffset inherits from previous input token:
Verify("a", "a b:1");
}