AnalyzerRuleVisitor extends AbstractRuleVisitor { @Override public void skipConstraint(Constraint constraint, Severity effectiveSeverity) throws RuleException { reportPlugin.beginConstraint(constraint); Result<Constraint> result = Result.<Constraint> builder().rule(constraint).status(Result.Status.SKIPPED).severity(effectiveSeverity).build(); reportPlugin.setResult(result); reportPlugin.endConstraint(); } AnalyzerRuleVisitor(AnalyzerConfiguration configuration, AnalyzerContext analyzerContext, Map<String, String> ruleParameters,
            Map<String, Collection<RuleInterpreterPlugin>> ruleInterpreterPlugins, ReportPlugin reportPlugin); @Override void beforeRules(); @Override void afterRules(); @Override boolean visitConcept(Concept concept, Severity effectiveSeverity); @Override void skipConcept(Concept concept, Severity effectiveSeverity); @Override void visitConstraint(Constraint constraint, Severity effectiveSeverity); @Override void skipConstraint(Constraint constraint, Severity effectiveSeverity); @Override void beforeGroup(Group group, Severity effectiveSeverity); @Override void afterGroup(Group group);  }
@Test public void skipConstraint() throws RuleException { analyzerRuleVisitor.skipConstraint(constraint, Severity.BLOCKER); verify(store, never()).executeQuery(eq(statement), anyMap()); verify(reportWriter).beginConstraint(constraint); ArgumentCaptor<Result> resultCaptor = ArgumentCaptor.forClass(Result.class); verify(reportWriter).setResult(resultCaptor.capture()); Result result = resultCaptor.getValue(); assertThat(result.getStatus(), equalTo(Result.Status.SKIPPED)); assertThat(result.getSeverity(), equalTo(Severity.BLOCKER)); verify(reportWriter).endConstraint(); }