@Test public void testEqualsObject() { Expression expression = new Expression("hello", "there"); Expression expression2 = new Expression("hello", "there"); assertEquals(expression, expression2); expression2 = new Expression("hello", "there2"); assertFalse(expression.equals(expression2)); expression2 = new Expression("hello"); assertFalse(expression.equals(expression2)); expression = new Expression("hello"); assertEquals(expression, expression2); }
@Override public boolean equals(Object obj) { Expression exp = (Expression) obj; return nullSafeEquals(expression, exp.expression) && nullSafeEquals(language, exp.language); }
Expression { @Override public boolean equals(Object obj) { Expression exp = (Expression) obj; return nullSafeEquals(expression, exp.expression) && nullSafeEquals(language, exp.language); } }
Expression { @Override public boolean equals(Object obj) { Expression exp = (Expression) obj; return nullSafeEquals(expression, exp.expression) && nullSafeEquals(language, exp.language); } Expression(String expression, String language);  Expression(String expression);  Expression(Expression toCopy); }
Expression { @Override public boolean equals(Object obj) { Expression exp = (Expression) obj; return nullSafeEquals(expression, exp.expression) && nullSafeEquals(language, exp.language); } Expression(String expression, String language);  Expression(String expression);  Expression(Expression toCopy); static Expression createExpressionFromDescribedExpression(String describedExpression); static Expression createExpression(String expression, String language); String getExpression(); String getLanguage(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
Expression { @Override public boolean equals(Object obj) { Expression exp = (Expression) obj; return nullSafeEquals(expression, exp.expression) && nullSafeEquals(language, exp.language); } Expression(String expression, String language);  Expression(String expression);  Expression(Expression toCopy); static Expression createExpressionFromDescribedExpression(String describedExpression); static Expression createExpression(String expression, String language); String getExpression(); String getLanguage(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }