final PackageDescr pkg = (PackageDescr) parseResource( "compilationUnit",
"bindings.drl" );
final RuleDescr ruleDescr = (RuleDescr) pkg.getRules().get( 0 );
final AndDescr lhs = ruleDescr.getLhs();
assertEquals( 2,
lhs.getDescrs().size() );
final PatternDescr cheese = (PatternDescr) lhs.getDescrs().get( 0 );
assertEquals( "Cheese",
cheese.getObjectType() );
assertEquals( 2,
lhs.getDescrs().size() );
BindingDescr fieldBinding = (BindingDescr) cheese.getBindings().get( 0 );
assertEquals( "type == \"stilton\"",
fieldBinding.getExpression() );
final PatternDescr person = (PatternDescr) lhs.getDescrs().get( 1 );
fieldBinding = (BindingDescr) person.getBindings().get( 0 );
assertEquals( "name == \"bob\"",
fieldBinding.getExpression() );
ExprConstraintDescr fld = (ExprConstraintDescr) person.getConstraint().getDescrs().get( 0 );