JcrAllUtil { public static boolean denotesDynamicJcrAll(@Nullable PropertyState property) { return property != null && Type.LONGS == property.getType() && property.count() == 1 && property.getValue(Type.LONG, 0) == DYNAMIC_JCR_ALL_VALUE; } private  JcrAllUtil(); static PrivilegeBits getPrivilegeBits(@Nullable PropertyState propertyState, @NotNull PrivilegeBitsProvider provider); static PropertyState asPropertyState(@NotNull String name, @NotNull PrivilegeBits bits, @NotNull PrivilegeBitsProvider provider); static boolean denotesDynamicJcrAll(@Nullable PropertyState property); static final long DYNAMIC_JCR_ALL_VALUE; }
@Test public void testDenotesDynamicAllNullPropertyState() { assertFalse(JcrAllUtil.denotesDynamicJcrAll(null)); }
@Test public void testDenotesDynamicAllNotLongsPropertyState() { assertFalse(JcrAllUtil.denotesDynamicJcrAll(PropertyStates.createProperty("any", "String"))); assertFalse(JcrAllUtil.denotesDynamicJcrAll(PropertyStates.createProperty("any", Lists.newArrayList("mv", "strings"), Type.STRINGS))); assertFalse(JcrAllUtil.denotesDynamicJcrAll(PropertyStates.createProperty("any", "-1"))); }
@Test public void testDenotesDynamicAllMVLongPropertyState() { assertFalse(JcrAllUtil.denotesDynamicJcrAll(PropertyStates.createProperty("any", Lists.newArrayList(-1, 2, 3), Type.LONGS))); }
@Test public void testDenotesDynamicAllSingleLongPropertyState() { assertFalse(JcrAllUtil.denotesDynamicJcrAll(PropertyStates.createProperty("any", DYNAMIC_JCR_ALL_VALUE))); }
@Test public void testDenotesDynamicAll() { assertTrue(JcrAllUtil.denotesDynamicJcrAll(PropertyStates.createProperty("any", Lists.newArrayList(DYNAMIC_JCR_ALL_VALUE), Type.LONGS))); }