public void testStaticMethod1() throws ParseException {
String[] fields = { "b", "t" };
String[] queries = { "one", "two" };
Query q = MultiFieldQueryParserWrapper.parse(queries, fields,
new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT));
assertEquals("b:one t:two", q.toString());
String[] queries2 = { "+one", "+two" };
q = MultiFieldQueryParserWrapper.parse(queries2, fields,
new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT));
assertEquals("(+b:one) (+t:two)", q.toString());
String[] queries3 = { "one", "+two" };
q = MultiFieldQueryParserWrapper.parse(queries3, fields,
new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT));
assertEquals("b:one (+t:two)", q.toString());
String[] queries4 = { "one +more", "+two" };
q = MultiFieldQueryParserWrapper.parse(queries4, fields,
new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT));
assertEquals("(b:one +b:more) (+t:two)", q.toString());
String[] queries5 = { "blah" };
try {
q = MultiFieldQueryParserWrapper.parse(queries5, fields,
new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT));
fail();
} catch (IllegalArgumentException e) {
// expected exception, array length differs
}