ACE implements JackrabbitAccessControlEntry { @NotNull public PrivilegeBits getPrivilegeBits() { return privilegeBits; } ACE(Principal principal, PrivilegeBits privilegeBits,
               boolean isAllow, Set<Restriction> restrictions, NamePathMapper namePathMapper); @NotNull PrivilegeBits getPrivilegeBits(); @NotNull Set<Restriction> getRestrictions(); @NotNull @Override Principal getPrincipal(); @Override boolean isAllow(); @NotNull @Override String[] getRestrictionNames(); @Nullable @Override Value getRestriction(@NotNull String restrictionName); @Nullable @Override Value[] getRestrictions(@NotNull String restrictionName); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testGetPrivilegeBits() throws RepositoryException { ACE entry = createEntry(true, PrivilegeConstants.JCR_READ); PrivilegeBits bits = entry.getPrivilegeBits(); assertNotNull(bits); assertEquals(PrivilegeBits.BUILT_IN.get(PrivilegeConstants.JCR_READ), bits); entry = createEntry(true, PrivilegeConstants.REP_WRITE); bits = entry.getPrivilegeBits(); assertNotNull(bits); assertEquals(PrivilegeBits.BUILT_IN.get(PrivilegeConstants.REP_WRITE), bits); entry = createEntry(true, PrivilegeConstants.JCR_ADD_CHILD_NODES, PrivilegeConstants.JCR_REMOVE_CHILD_NODES); bits = entry.getPrivilegeBits(); assertNotNull(bits); PrivilegeBits expected = getBitsProvider().getBits( PrivilegeConstants.JCR_ADD_CHILD_NODES, PrivilegeConstants.JCR_REMOVE_CHILD_NODES); assertEquals(expected, bits); }