public virtual void TestBooleanQuery()
{
BooleanQuery.MaxClauseCount = 2;
QueryParser qp = new QueryParser(Version.LUCENE_CURRENT, "field", new WhitespaceAnalyzer());
Assert.Throws<ParseException>(() => qp.Parse("one two three"),
"ParseException expected due to too many boolean clauses");
}