FactPattern pattern2 = (FactPattern) m.lhs[ 1 ];
assertEquals( 1, pattern2.getConstraintList().getNumberOfConstraints() );
assertTrue( pattern2.getConstraintList().getConstraint( 0 ) instanceof SingleFieldConstraint );
SingleFieldConstraint constraint = (SingleFieldConstraint) pattern2.getConstraintList().getConstraint( 0 );
assertEquals( "age", constraint.getFieldName() );
assertEquals( "==", constraint.getOperator() );
assertEquals( BaseSingleFieldConstraint.TYPE_EXPR_BUILDER_VALUE, constraint.getConstraintValueType() );
assertEquals( "", constraint.getValue() );
assertEquals( 2, constraint.getExpressionValue().getParts().size() );
assertTrue( constraint.getExpressionValue().getParts().get( 0 ) instanceof ExpressionVariable );
ExpressionVariable expressionVariable = (ExpressionVariable) constraint.getExpressionValue().getParts().get( 0 );
assertEquals( "a", expressionVariable.getName() );
assertEquals( "Applicant", expressionVariable.getClassType() );
assertEquals( "this", expressionVariable.getGenericType() );
assertEquals( constraint.getExpressionValue().getParts().get( 1 ), expressionVariable.getNext() );
assertTrue( constraint.getExpressionValue().getParts().get( 1 ) instanceof ExpressionField );
ExpressionField expressionField = (ExpressionField) constraint.getExpressionValue().getParts().get( 1 );
assertEquals( "age", expressionField.getName() );
assertEquals( "java.lang.Integer", expressionField.getClassType() );
assertEquals( "Integer", expressionField.getGenericType() );
}