sb.append("<token regexp=\"yes\">idea|proposal</token>"); // match "idea"
sb.append("</pattern> </rule> </category> </rules>");
final InputStream input = new ByteArrayInputStream(sb.toString().getBytes());
final PatternRuleLoader ruleLoader = new PatternRuleLoader();
final List<PatternRule> rules = ruleLoader.getRules(input, "test.xml");
final PatternRuleQueryBuilder patternRuleQueryBuilder = new PatternRuleQueryBuilder(language);
final Query query = patternRuleQueryBuilder.buildRelaxedQuery(rules.get(0));
assertEquals("+fieldLowercase:how +fieldLowercase:_pos_prp +fieldLowercase:thin " +
"+spanNear([fieldLowercase:this, SpanMultiTermQueryWrapper(fieldLowercase:/_pos_(jj|dt)/)], 0, false) " +