@Test
public void testPropertyValueDeny() throws Exception {

    File playground = TestPackageUtil.prepareTestPackageFromFolder("playground.zip",
            new File("src/test/resources/jcr_prop_constraints_playground"));
    TestUtil.testBlock(() -> {
        ProgressCheck check = new JcrProperties().newInstance(obj()
                // intend to only check /apps/acme by ensuring scopePaths excludes /apps/aperture, which has the
                // same jcr:title value
                .key("scopePaths", arr(new Rule(RuleType.INCLUDE, Pattern.compile("/apps/acme"))))
                .key("properties", arr()
                        .val(obj()
                                .key("name", "jcr:title")
                                .key("valueRules", arr(new Rule(RuleType.DENY, Pattern.compile("Acme"))))
                        )
                )
                .get());
        CheckReport report = scanWithCheck(check, playground);
        Assert.assertEquals("one violation: " + report.getViolations(), 1, report.getViolations().size());
    });
    TestUtil.testBlock(() -> {
        ProgressCheck check = new JcrProperties().newInstance(obj()
                .key("properties", arr()
                        .val(obj()
                                .key("name", "multiString")
                                .key("valueRules", arr(new Rule(RuleType.DENY, Pattern.compile("two"))))
                        )
                )
                .get());
        CheckReport report = scanWithCheck(check, playground);
        Assert.assertEquals("two violation: " + report.getViolations(), 2, report.getViolations().size());
    });
}