SingleFieldConstraint sfc2 = new SingleFieldConstraint("q");
x.addConstraint( sfc2 );
sfc2.fieldBinding = "field2";
model.lhs[1] = new CompositeFactPattern();
List vars = model.getAllVariables();
assertEquals(3, vars.size());
assertEquals("boundFact", vars.get( 0 ));
assertEquals("field1", vars.get( 1 ));