assertEquals( 1,
m.lhs.length );
IPattern p = m.lhs[ 0 ];
assertTrue( p instanceof FactPattern );
FactPattern fp = (FactPattern) p;
assertEquals( "ParentType",
fp.getFactType() );
assertEquals( 3,
fp.getConstraintList().getConstraints().length );
assertTrue( fp.getConstraint( 0 ) instanceof SingleFieldConstraint );
SingleFieldConstraint sfp0 = (SingleFieldConstraint) fp.getConstraint( 0 );
assertEquals( "ParentType",
sfp0.getFactType() );
assertEquals( "this",
sfp0.getFieldName() );
assertEquals( DataType.TYPE_THIS,
sfp0.getFieldType() );
assertEquals( "!= null",
sfp0.getOperator() );
assertNull( sfp0.getValue() );
assertEquals( BaseSingleFieldConstraint.TYPE_UNDEFINED,
sfp0.getConstraintValueType() );
assertNull( sfp0.getParent() );
assertTrue( fp.getConstraint( 1 ) instanceof SingleFieldConstraintEBLeftSide );
SingleFieldConstraintEBLeftSide sfp1 = (SingleFieldConstraintEBLeftSide) fp.getConstraint( 1 );
assertEquals( "ParentType",
sfp1.getFactType() );
assertEquals( "parentChildField",
sfp1.getFieldName() );
assertEquals( "org.test.ChildType",
sfp1.getFieldType() );
assertEquals( "!= null",
sfp1.getOperator() );
assertNull( sfp1.getValue() );
assertEquals( BaseSingleFieldConstraint.TYPE_UNDEFINED,
sfp1.getConstraintValueType() );
assertNull( sfp1.getParent() );
assertTrue( fp.getConstraint( 2 ) instanceof SingleFieldConstraintEBLeftSide );
SingleFieldConstraintEBLeftSide sfp2 = (SingleFieldConstraintEBLeftSide) fp.getConstraint( 2 );
assertEquals( "childField",
sfp2.getFieldName() );
assertEquals( "java.lang.String",
sfp2.getFieldType() );
assertEquals( "==",