AnalyzerRuleVisitor extends AbstractRuleVisitor { @Override public void skipConcept(Concept concept, Severity effectiveSeverity) throws RuleException { reportPlugin.beginConcept(concept); Result<Concept> result = Result.<Concept> builder().rule(concept).status(Result.Status.SKIPPED).severity(effectiveSeverity).build(); reportPlugin.setResult(result); reportPlugin.endConcept(); } 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 skipConcept() throws RuleException { analyzerRuleVisitor.skipConcept(concept, Severity.MAJOR); verify(store, never()).executeQuery(eq(statement), anyMap()); verify(reportWriter).beginConcept(concept); 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.MAJOR)); verify(reportWriter).endConcept(); verify(store, never()).create(ConceptDescriptor.class); }