DITCheck extends BaseTreeVisitor implements JavaFileScanner { @VisibleForTesting void setMax(int max) { this.max = max; }  @Override void scanFile(JavaFileScannerContext context); @Override void visitClass(ClassTree tree); void setFilteredClasses(String filteredClasses); static final int DEFAULT_MAX; }
@Test void max_level_is_2() { DITCheck check = new DITCheck(); check.setMax(2); JavaCheckVerifier.newVerifier() .onFile("src/test/files/checks/Dit.java") .withCheck(check) .verifyIssues(); JavaCheckVerifier.newVerifier() .onFile("src/test/files/checks/Dit.java") .withCheck(check) .withoutSemantic() .verifyNoIssues(); }