SelectHandler implements Handler { public void addVar(Var var) { if (var == null) { query.setQueryResultStar(true); } else { query.setQueryResultStar(false); query.addResultVar(var); } } SelectHandler(AggregationHandler aggHandler); void setDistinct(boolean state); void setReduced(boolean state); void addVar(Var var); void addVar(String expression, Var var); void addVar(Expr expr, Var var); List<Var> getVars(); VarExprList getProject(); void addAll(SelectHandler selectHandler); @Override void setVars(Map<Var, Node> values); @Override void build();  }
@Test public void testAddVar() { Var v = Var.alloc("one"); handler.addVar(v); VarExprList expr = query.getProject(); assertEquals(1, expr.size()); assertTrue(expr.contains(v)); }