### Question:
CriterionSimplifier implements CriterionVisitor { public CriterionDto simplify(CriterionDto criterionDto) { CriterionContext context = new CriterionContext(); criterionDto.accept(this, context); return (CriterionDto) context.getCriterion(); }  CriterionDto simplify(CriterionDto criterionDto); @Override void visit(LogicalCriterion criterion, Object context); @Override void visit(AttributeCriterion<?> criterion, Object context); @Override void visit(GeometryCriterion criterion, Object context); @Override void visit(BboxCriterion criterion, Object context); @Override void visit(FidCriterion criterion, Object context); @Override void visit(DWithinCriterion criterion, Object context); @Override void visit(FullTextCriterion criterion, Object context); @Override void visit(IncludeCriterion criterion, Object context); @Override void visit(ExcludeCriterion criterion, Object context); @Override void visit(Criterion criterionDto, Object context);  }### Answer:
@Test public void testIncludeExclude() { CriterionSimplifier simplifier = new CriterionSimplifier(); Assert.assertEquals(getSomeCriterionDto(), simplifier.simplify(new LogicalCriterionDto(Operator.OR, CriterionDto.EXCLUDE, getSomeCriterionDto()))); }