### Question:
ConditionVisit { public ConditionVisit(Condition root) { this.root = root; } ConditionVisit(Condition root); void accept(Visitor<Condition> visitor);  }### Answer:
@Test public void testConditionVisit() { Condition condition1 = new True(); Condition condition2 = new True(); Condition condition3 = new True(); Condition root = And.all(condition1, Or.any(condition2, condition3)); final Set<Condition> visited = new HashSet<Condition>(); new ConditionVisit(root).accept(new Visitor<Condition>() { @Override public void visit(Condition e) { visited.add(e); } }); assertEquals(5, visited.size()); }