@Test
public void testDenyAll() throws Exception {

    TestUtil.testBlock(() -> {
        ProgressCheck check = new Subpackages().newInstance(key("denyAll", false).get());
        CheckReport report = scanWithCheck(check, "subtest_with_content.zip");
        logViolations("denyAll:false", report);
        Assert.assertEquals("no violations", 0, report.getViolations().size());
        assertTrue("all violations have packageIds", report.getViolations().stream()
                .allMatch(viol -> !viol.getPackages().isEmpty()));
    });
    TestUtil.testBlock(() -> {
        ProgressCheck check = new Subpackages().newInstance(key("denyAll", true).get());
        CheckReport report = scanWithCheck(check, "subtest_with_content.zip");
        logViolations("denyAll:false", report);
        Assert.assertEquals("two violations", 2, report.getViolations().size());
        assertTrue("all violations have packageIds", report.getViolations().stream()
                .allMatch(viol -> !viol.getPackages().isEmpty()));
    });
}