UnaryExpr extends Expr { @Override public UnaryExpr clone() { return new UnaryExpr(expr.clone(), op); } UnaryExpr(Expr expr, UnOp op); Expr getExpr(); UnOp getOp(); @Override void accept(IAstVisitor visitor); @Override UnaryExpr clone(); @Override boolean hasChild(IAstNode candidateChild); @Override Expr getChild(int index); @Override void setChild(int index, Expr expr); @Override int getNumChildren();  }
@Test public void testClone() throws Exception { UnaryExpr theClone = expr.clone(); assertFalse(expr == theClone); assertEquals(theClone.getText(), expr.getText()); }