@Test
public void testModeMerge() throws Exception {

    TestUtil.testBlock(() -> {
        ProgressCheck handler = new FilterSets().newInstance(obj().get());
        CheckReport report = scanWithCheck(handler, "tmp_mode_merge.zip");
        Assert.assertEquals("one violation", 1, report.getViolations().size());
        Assert.assertEquals("is severity", Severity.MINOR,
                report.getViolations().iterator().next().getSeverity());
        assertTrue("all violations have packageIds", report.getViolations().stream()
                .allMatch(viol -> !viol.getPackages().isEmpty()));
    });
    TestUtil.testBlock(() -> {
        ProgressCheck handler = new FilterSets().newInstance(key("importModeSeverity", "severe").get());
        CheckReport report = scanWithCheck(handler, "tmp_mode_merge.zip");
        Assert.assertEquals("one violation", 1, report.getViolations().size());
        Assert.assertEquals("is severity", Severity.SEVERE,
                report.getViolations().iterator().next().getSeverity());
        assertTrue("all violations have packageIds", report.getViolations().stream()
                .allMatch(viol -> !viol.getPackages().isEmpty()));
    });
}