@Test
public void testAllowedModes() throws Exception {

    TestUtil.testBlock(() -> {
        ProgressCheck check =
                new AcHandling().newInstance(obj().key("allowedModes", arr("merge_preserve")).get());
        CheckReport report = scanWithCheck(check, "test_childnodeorder.zip");
        logViolations("allowedModes:merge_preserve", 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 AcHandling().newInstance(obj().key("allowedModes", arr("ignore")).get());
        CheckReport report = scanWithCheck(check, "test_childnodeorder.zip");
        logViolations("allowedModes:ignore", report);
        Assert.assertEquals("one violation", 1, report.getViolations().size());
        assertTrue("all violations have packageIds", report.getViolations().stream()
                .allMatch(viol -> !viol.getPackages().isEmpty()));
    });
}