public virtual void TestRetainMockAttribute()
        {
            CharArraySet dict      = makeDictionary("abc", "d", "efg");
            Tokenizer    tokenizer = new WhitespaceTokenizer(TEST_VERSION_CURRENT, new StringReader("abcdefg"));
            TokenStream  stream    = new MockRetainAttributeFilter(tokenizer);

            stream = new DictionaryCompoundWordTokenFilter(TEST_VERSION_CURRENT, stream, dict, CompoundWordTokenFilterBase.DEFAULT_MIN_WORD_SIZE, CompoundWordTokenFilterBase.DEFAULT_MIN_SUBWORD_SIZE, CompoundWordTokenFilterBase.DEFAULT_MAX_SUBWORD_SIZE, false);
            IMockRetainAttribute retAtt = stream.AddAttribute <IMockRetainAttribute>();

            stream.Reset();
            while (stream.IncrementToken())
            {
                assertTrue("Custom attribute value was lost", retAtt.Retain);
            }
        }
            public override void CopyTo(IAttribute target)
            {
                IMockRetainAttribute t = (IMockRetainAttribute)target;

                t.Retain = retain;
            }
 internal MockRetainAttributeFilter(TokenStream input)
     : base(input)
 {
     retainAtt = AddAttribute <IMockRetainAttribute>();
 }
 internal MockRetainAttributeFilter(TokenStream input)
         : base(input)
 {
     retainAtt = AddAttribute<IMockRetainAttribute>();
 }