@Test
public void testGetPrivileges() 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.getPrivileges("/foo", principals)).thenReturn(privileges);
    assertNull("should be null in wrong path", facade.getPrivileges("", principals));
    assertSame("should hasPrivileges", privileges, facade.getPrivileges("/foo", principals));
}