assertNotNull( m );
assertEquals( 1, m.lhs.length );
assertTrue( m.lhs[ 0 ] instanceof FactPattern );
assertTrue( ( (FactPattern) m.lhs[ 0 ] ).getFieldConstraints()[ 0 ] instanceof SingleFieldConstraintEBLeftSide );
SingleFieldConstraintEBLeftSide ebLeftSide = (SingleFieldConstraintEBLeftSide) ( (FactPattern) m.lhs[ 0 ] ).getFieldConstraints()[ 0 ];
assertEquals( "childField",
ebLeftSide.getFieldName() );
assertEquals( "java.lang.String",
ebLeftSide.getFieldType() );
assertEquals( "==",
ebLeftSide.getOperator() );
assertEquals( "hello",
ebLeftSide.getValue() );
assertEquals( 3, ebLeftSide.getExpressionLeftSide().getParts().size() );
assertTrue( ebLeftSide.getExpressionLeftSide().getParts().get( 0 ) instanceof ExpressionUnboundFact );
ExpressionUnboundFact expressionUnboundFact = ( (ExpressionUnboundFact) ebLeftSide.getExpressionLeftSide().getParts().get( 0 ) );
assertEquals( "ParentType",
expressionUnboundFact.getName() );
assertEquals( "ParentType",
expressionUnboundFact.getClassType() );
assertEquals( "ParentType",
expressionUnboundFact.getGenericType() );
assertEquals( m.lhs[ 0 ],
expressionUnboundFact.getFact() );
assertNull( expressionUnboundFact.getPrevious() );
assertEquals( ebLeftSide.getExpressionLeftSide().getParts().get( 1 ), expressionUnboundFact.getNext() );
assertTrue( ebLeftSide.getExpressionLeftSide().getParts().get( 1 ) instanceof ExpressionField );
ExpressionField expressionField1 = (ExpressionField) ebLeftSide.getExpressionLeftSide().getParts().get( 1 );
assertEquals( "parentChildField",
expressionField1.getName() );
assertEquals( "org.test.ChildType",
expressionField1.getClassType() );
assertEquals( "ChildType",
expressionField1.getGenericType() );
assertEquals( ebLeftSide.getExpressionLeftSide().getParts().get( 0 ), expressionField1.getPrevious() );
assertEquals( ebLeftSide.getExpressionLeftSide().getParts().get( 2 ), expressionField1.getNext() );
assertTrue( ebLeftSide.getExpressionLeftSide().getParts().get( 2 ) instanceof ExpressionField );
ExpressionField expressionField2 = (ExpressionField) ebLeftSide.getExpressionLeftSide().getParts().get( 2 );
assertEquals( "childField",
expressionField2.getName() );
assertEquals( "java.lang.String",
expressionField2.getClassType() );
assertEquals( "String",
expressionField2.getGenericType() );
assertEquals( ebLeftSide.getExpressionLeftSide().getParts().get( 1 ), expressionField2.getPrevious() );
assertNull( expressionField2.getNext() );
}