ArrayIndexExpr extends Expr { @Override public ArrayIndexExpr clone() { return new ArrayIndexExpr(array.clone(), index.clone()); } ArrayIndexExpr(Expr array, Expr index); Expr getArray(); Expr getIndex(); void setIndex(Expr index); @Override void accept(IAstVisitor visitor); @Override ArrayIndexExpr 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 { ArrayIndexExpr theClone = expr.clone(); assertFalse(expr == theClone); assertEquals(theClone.getText(), expr.getText()); }