ArrayConstructorExpr extends Expr { @Override public ArrayConstructorExpr clone() { List<Expr> newArgs = args.stream().map(Expr::clone).collect(Collectors.toList()); return new ArrayConstructorExpr(arrayType.clone(), newArgs); } ArrayConstructorExpr(ArrayType arrayType, List<Expr> args); ArrayType getArrayType(); List<Expr> getArgs(); @Override void accept(IAstVisitor visitor); @Override ArrayConstructorExpr 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 { ArrayConstructorExpr theClone = arrayConstructor.clone(); assertFalse(arrayConstructor == theClone); assertEquals(theClone.getText(), arrayConstructor.getText()); }