EqualityExpression extends Expression { @Override public String toString() { return getPropertyName() + " " + getOperator() + " " + value; } EqualityExpression(Operator operator, String propertyName, Object value); Object getValue(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testToString() { String expected = propertyName + " " + operator + " " + testValue; assertEquals(expected, e.toString()); }