@Test
  public void testComparingFieldToExpression() throws Exception {
    FactPattern f1 = new FactPattern();
    f1.setBoundName("f1");

    FactPattern f2 = new FactPattern();
    SingleFieldConstraint constraint = new SingleFieldConstraint();
    constraint.setOperator("==");
    constraint
        .getExpressionValue()
        .appendPart(new ExpressionVariable("field", "java.lang.Number", "Number"));
    f2.addConstraint(constraint);

    model.lhs = new IPattern[] {f1, f2};

    assertTrue(validator.isValid());
  }