public virtual void TestMultipleSources()
{
TeeSinkTokenFilter tee1 = new TeeSinkTokenFilter(new WhitespaceTokenizer(new System.IO.StringReader(buffer1.ToString())));
TeeSinkTokenFilter.SinkTokenStream dogDetector = tee1.NewSinkTokenStream(dogFilter);
TeeSinkTokenFilter.SinkTokenStream theDetector = tee1.NewSinkTokenStream(theFilter);
TokenStream source1 = new CachingTokenFilter(tee1);
tee1.AddAttribute<ICheckClearAttributesAttribute>();
dogDetector.AddAttribute<ICheckClearAttributesAttribute>();
theDetector.AddAttribute<ICheckClearAttributesAttribute>();
TeeSinkTokenFilter tee2 = new TeeSinkTokenFilter(new WhitespaceTokenizer(new System.IO.StringReader(buffer2.ToString())));
tee2.AddSinkTokenStream(dogDetector);
tee2.AddSinkTokenStream(theDetector);
TokenStream source2 = tee2;
AssertTokenStreamContents(source1, tokens1);
AssertTokenStreamContents(source2, tokens2);
AssertTokenStreamContents(theDetector, new String[] { "The", "the", "The", "the" });
source1.Reset();
TokenStream lowerCasing = new LowerCaseFilter(source1);
String[] lowerCaseTokens = new String[tokens1.Length];
for (int i = 0; i < tokens1.Length; i++)
lowerCaseTokens[i] = tokens1[i].ToLower();
}