### Question:
TextExpression implements Distributable { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TextExpression that = (TextExpression) o; return expression.equals(that.expression); } TextExpression(String aExpression); String get(); @Override boolean equals(Object o); @Override int hashCode(); @Override Map<String, Object> serialize(); static TextExpression deserialize(Map<String,Object> aSerializedData); final String expression; }### Answer:
@Test public void testEquals() throws Exception { TextExpression theExpression = new TextExpression("test"); TextExpression theExpression1 = new TextExpression("test"); TextExpression theExpression2 = new TextExpression("lala"); assertEquals(theExpression, theExpression); assertEquals(theExpression, theExpression1); assertNotEquals(theExpression, theExpression2); assertNotEquals(theExpression, "lala"); assertNotEquals(theExpression, null); }