BinaryExpr extends Expr { @Override public int getNumChildren() { return 2; } BinaryExpr(Expr lhs, Expr rhs, BinOp op); Expr getLhs(); void setLhs(Expr lhs); Expr getRhs(); void setRhs(Expr rhs); BinOp getOp(); @Override void accept(IAstVisitor visitor); @Override BinaryExpr clone(); @Override boolean hasChild(IAstNode candidateChild); @Override Expr getChild(int index); @Override void setChild(int index, Expr expr); @Override int getNumChildren();  }
@Test public void getNumChildren() throws Exception { BinaryExpr be = new BinaryExpr(new BoolConstantExpr(true), new BoolConstantExpr(false), BinOp.LXOR); assertEquals(2, be.getNumChildren()); }