public void testBoundFieldVariableFromOR() throws Exception {
final RuleModel model = new RuleModel();
model.lhs = new IPattern[1];
CompositeFactPattern compositeFactPattern = new CompositeFactPattern(CompositeFactPattern.COMPOSITE_TYPE_OR);
model.lhs[0] = compositeFactPattern;
FactPattern pattern1 = new FactPattern();
SingleFieldConstraint constraint1 = new SingleFieldConstraint();
pattern1.addConstraint(constraint1);
constraint1.setFieldBinding("test");
compositeFactPattern.addFactPattern(pattern1);
FactPattern pattern2 = new FactPattern();
SingleFieldConstraint constraint2 = new SingleFieldConstraint();
pattern2.addConstraint(constraint2);
compositeFactPattern.addFactPattern(pattern2);
SingleFieldConstraint lhsBoundField = model.getLHSBoundField("test");
assertEquals(constraint1,lhsBoundField);
}