PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get( 0 );
final ExprConstraintDescr fieldBinding = (ExprConstraintDescr) pattern.getDescrs().get( 0 );
assertEquals( "$likes:like",
fieldBinding.getExpression() );
final NotDescr not = (NotDescr) rule.getLhs().getDescrs().get( 1 );
pattern = (PatternDescr) not.getDescrs().get( 0 );
final ExprConstraintDescr fld = (ExprConstraintDescr) pattern.getConstraint().getDescrs().get( 0 );
assertEquals( "type == $likes",
fld.getExpression() );