Rule rule3 = ((KnowledgePackageImp)pkg3).pkg.getRule( "rule1" );
// test return value
Pattern p1 = ( Pattern ) rule1.getLhs().getChildren().get( 0 );
ReturnValueConstraint rvc1 = ( ReturnValueConstraint ) p1.getConstraints().get( 1 );
ReturnValueExpression rve1 = rvc1.getExpression();
Pattern p2 = ( Pattern ) rule2.getLhs().getChildren().get( 0 );
ReturnValueConstraint rvc2 = ( ReturnValueConstraint ) p2.getConstraints().get( 1 );
ReturnValueExpression rve2 = rvc2.getExpression();
assertNotSame( rve1, rve2 );
assertEquals( rve1, rve2 );
Pattern p3 = ( Pattern ) rule3.getLhs().getChildren().get( 0 );
ReturnValueConstraint rvc3 = ( ReturnValueConstraint ) p3.getConstraints().get( 1 );
ReturnValueExpression rve3 = rvc3.getExpression();
assertNotSame( rve1, rve3 );
assertThat(rve1, not( equalTo( rve3 ) ) );
// test inline eval
PredicateConstraint pc1 = ( PredicateConstraint ) p1.getConstraints().get( 2 );