@Test
public void testMajorViolation() {

    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.majorViolation("description", id0, id1);
    assertTrue("violation reported", check.getReportedViolations().stream()
            .anyMatch(violation -> violation.getSeverity() == Severity.MAJOR
                    && "description".equals(violation.getDescription())
                    && violation.getPackages().contains(id0)
                    && violation.getPackages().contains(id1)
            ));
}