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() );
FieldBindingDescr fieldBinding = (FieldBindingDescr) cheese.getConstraint().getDescrs().get( 0 );
assertEquals( "type",
fieldBinding.getFieldName() );
FieldConstraintDescr fld = (FieldConstraintDescr) cheese.getConstraint().getDescrs().get( 1 );
LiteralRestrictionDescr literalDescr = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
//LiteralDescr literalDescr = (LiteralDescr) cheese.getDescrs().get( 1 );
assertEquals( "type",
fld.getFieldName() );
assertEquals( "==",
literalDescr.getEvaluator() );
assertEquals( "stilton",
literalDescr.getText() );
final PatternDescr person = (PatternDescr) lhs.getDescrs().get( 1 );
fieldBinding = (FieldBindingDescr) person.getConstraint().getDescrs().get( 0 );
assertEquals( "name",
fieldBinding.getFieldName() );
fld = (FieldConstraintDescr) person.getConstraint().getDescrs().get( 1 );
literalDescr = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
assertEquals( "name",
fld.getFieldName() );
assertEquals( "==",
literalDescr.getEvaluator() );
assertEquals( "bob",
literalDescr.getText() );
fld = (FieldConstraintDescr) person.getConstraint().getDescrs().get( 2 );
final VariableRestrictionDescr variableDescr = (VariableRestrictionDescr) fld.getRestrictions().get( 0 );
assertEquals( "likes",
fld.getFieldName() );
assertEquals( "==",