StaticImportCountCheck extends IssuableSubscriptionVisitor { public void setThreshold(int threshold) { this.threshold = threshold; }  @Override List<Tree.Kind> nodesToVisit(); @Override void visitNode(Tree tree); void setThreshold(int threshold);  }
@Test void cu_with_custom_threshold_compliant() { StaticImportCountCheck check = new StaticImportCountCheck(); check.setThreshold(5); JavaCheckVerifier.newVerifier() .onFile(TEST_FILES_DIR + "MixedStandardAndStaticImportsCompliant.java") .withCheck(check) .verifyNoIssues(); }
@Test void cu_with_custom_threshold_noncompliant() { StaticImportCountCheck check = new StaticImportCountCheck(); check.setThreshold(3); JavaCheckVerifier.newVerifier() .onFile(TEST_FILES_DIR + "MixedStandardAndStaticImportsCustomThreshold.java") .withCheck(check) .verifyIssues(); }