Map globals = packages[0].getGlobals();
assertEquals(DefaultGenerator.class, globals.get("generator"));
Rule[] rules = packages[0].getRules();
assertEquals(1, rules.length);
assertEquals("template1", rules[0].getName());
GroupElement lhs = rules[0].getLhs();
//when
// r : Row()
// Cell(row == r, column == "column1")
// Cell(row == r, column == "column2")
assertEquals(3, lhs.getChildren().size());
org.drools.rule.Pattern pattern = (org.drools.rule.Pattern) lhs.getChildren().get(1);
LiteralConstraint constraint = (LiteralConstraint) pattern.getConstraints().get(1);
assertEquals("column1", constraint.getField().getValue());
pattern = (org.drools.rule.Pattern) lhs.getChildren().get(2);
constraint = (LiteralConstraint) pattern.getConstraints().get(1);
assertEquals("column2", constraint.getField().getValue());
}