@Test
public void testHasPrivileges() throws Exception {

    JackrabbitAccessControlManager delegate = mock(JackrabbitAccessControlManager.class);
    JackrabbitAccessControlManagerFacade facade = getFacade(delegate);
    final Set<Principal> principals = Collections.singleton(EveryonePrincipal.getInstance());
    final Privilege[] privileges = new Privilege[0];
    when(delegate.hasPrivileges("/foo", principals, privileges)).thenReturn(true);
    assertFalse("should not hasPrivileges", facade.hasPrivileges("", principals, privileges));
    assertTrue("should hasPrivileges", facade.hasPrivileges("/foo", principals, privileges));
}