CognitiveComplexityMethodCheck extends IssuableSubscriptionVisitor { public void setMax(int max) { this.max = max; }  @Override List<Tree.Kind> nodesToVisit(); @Override void visitNode(Tree tree); void setMax(int max);  }
@Test void testBasicCalculations() { CognitiveComplexityMethodCheck check = new CognitiveComplexityMethodCheck(); check.setMax(0); JavaCheckVerifier.newVerifier() .onFile("src/test/files/checks/CognitiveComplexityMethodCheckMax0.java") .withCheck(check) .verifyIssues(); }