SimpleProgressCheck implements ProgressCheck { protected final void minorViolation(final String description, final PackageId... packages) { this.reporting(builder -> builder .withSeverity(Severity.MINOR) .withDescription(description) .withPackage(packages)); }  @Override void setResourceBundle(final ResourceBundle resourceBundle); @Override void startedScan(); @Override Collection<Violation> getReportedViolations();  }
@Test public void testMinorViolation() { SimpleProgressCheck check = new SimpleProgressCheck(); PackageId id0 = PackageId.fromString("my_packages:test_0:1.0"); PackageId id1 = PackageId.fromString("my_packages:test_1:1.0"); check.minorViolation("description", id0, id1); assertTrue("violation reported", check.getReportedViolations().stream() .anyMatch(violation -> violation.getSeverity() == Severity.MINOR && "description".equals(violation.getDescription()) && violation.getPackages().contains(id0) && violation.getPackages().contains(id1) )); }