@Test
public void testBuilder_withJcrPrivileges() {

    final String privilege1 = "foo:priv1";
    final String privilege2 = "foo:priv2";
    final List<PrivilegeDefinition> expectPrivileges =
            JsonCnd.getPrivilegesFromJson(arr(privilege1, privilege2).get(), getMapping());
    assertEquals("expect privileges", expectPrivileges,
            builder().withJcrPrivileges(expectPrivileges)
                    .build().getJcrPrivileges());
}