### Question:
ASTScalar extends SimpleNode { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ASTScalar other = (ASTScalar) o; return value != null ? value.equals(other.value) : other.value == null; } ASTScalar(int id);  ASTScalar();  ASTScalar(Object value); @Override Expression shallowCopy(); @Override void appendAsString(Appendable out); @Override void appendAsEJBQL(List<Object> parameterAccumulator, Appendable out, String rootId); void setValue(Object value); Object getValue(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testEquals() throws Exception { ASTScalar strScalar1 = new ASTScalar("test"); ASTScalar strScalar2 = new ASTScalar("test"); assertEquals(strScalar1, strScalar2); ASTScalar nullScalar1 = new ASTScalar(null); ASTScalar nullScalar2 = new ASTScalar(null); assertEquals(nullScalar1, nullScalar2); assertNotEquals(strScalar1, nullScalar1); }