IntConstantExpr extends ConstantExpr { @Override public IntConstantExpr clone() { return new IntConstantExpr(value); } IntConstantExpr(String text); @Override boolean hasChild(IAstNode child); String getValue(); int getNumericValue(); @Override void accept(IAstVisitor visitor); @Override IntConstantExpr clone();  }
@Test public void testClone() throws Exception { IntConstantExpr ec1 = new IntConstantExpr("10"); IntConstantExpr ec2 = ec1.clone(); assertEquals(ec1.getValue(), ec2.getValue()); }