### Question:
ValidatingVisitor implements Visitor<Set<Expression<?>>, Set<Expression<?>>>, Serializable { @Override public Set<Expression<?>> visit(Constant<?> expr, Set<Expression<?>> known) { return known; } ValidatingVisitor();  ValidatingVisitor(String errorTemplate); @Override Set<Expression<?>> visit(Constant<?> expr, Set<Expression<?>> known); @Override Set<Expression<?>> visit(FactoryExpression<?> expr, Set<Expression<?>> known); @Override Set<Expression<?>> visit(Operation<?> expr, Set<Expression<?>> known); @Override Set<Expression<?>> visit(ParamExpression<?> expr, Set<Expression<?>> known); @Override Set<Expression<?>> visit(Path<?> expr, Set<Expression<?>> known); @Override Set<Expression<?>> visit(SubQueryExpression<?> expr, Set<Expression<?>> known); @Override Set<Expression<?>> visit(TemplateExpression<?> expr, Set<Expression<?>> known); static final ValidatingVisitor DEFAULT; }### Answer:
@Test public void visitConstantOfQVoid() { validator.visit(ConstantImpl.create("XXX"), known); }
@Test public void visitFactoryExpressionOfQVoid() { validator.visit(new QBean(Object.class, ExpressionUtils.path(String.class, "path")), known); }
@Test public void visitOperationOfQVoid() { validator.visit((Operation) Expressions.path(Object.class, "path").isNull(), known); }
@Test public void visitParamExpressionOfQVoid() { validator.visit(new Param(Object.class, "prop"), known); }
@Test public void visitPathOfQVoid() { validator.visit(ExpressionUtils.path(Object.class, "path"), known); }
@Test public void visitSubQueryExpressionOfQVoid() { validator.visit(new SubQueryExpressionImpl(Object.class, new DefaultQueryMetadata()), known); }
@Test public void visitTemplateExpressionOfQVoid() { validator.visit((TemplateExpression) Expressions.template(Object.class, "XXX"), known); }