### Question:
TernaryExpr extends Expr { public Expr getThenExpr() { return thenExpr; } TernaryExpr(Expr test, Expr thenExpr, Expr elseExpr); Expr getTest(); Expr getThenExpr(); Expr getElseExpr(); @Override void accept(IAstVisitor visitor); @Override TernaryExpr clone(); @Override boolean hasChild(IAstNode candidateChild); @Override Expr getChild(int index); @Override void setChild(int index, Expr expr); @Override int getNumChildren();  }### Answer:
@Test public void getThenExpr() throws Exception { TernaryExpr te = makeTernary(); assertEquals(thenVar, te.getThenExpr()); assertEquals(thenVar, te.getChild(1)); }