JackrabbitAccessControlManagerFacade extends AccessControlManagerFacade<JackrabbitAccessControlManager> implements JackrabbitAccessControlManager { @Override public JackrabbitAccessControlPolicy[] getApplicablePolicies(Principal principal) throws RepositoryException { return delegate.getApplicablePolicies(principal); } @SuppressWarnings("WeakerAccess")  JackrabbitAccessControlManagerFacade(final @NotNull JackrabbitAccessControlManager delegate); @Override JackrabbitAccessControlPolicy[] getApplicablePolicies(Principal principal); @Override JackrabbitAccessControlPolicy[] getPolicies(Principal principal); @Override AccessControlPolicy[] getEffectivePolicies(Set<Principal> principals); @Override boolean hasPrivileges(String absPath, Set<Principal> principals, Privilege[] privileges); @Override Privilege[] getPrivileges(String absPath, Set<Principal> principals);  }
@Test public void testGetApplicablePolicies() throws Exception { JackrabbitAccessControlManager delegate = mock(JackrabbitAccessControlManager.class); final Principal principal = EveryonePrincipal.getInstance(); JackrabbitAccessControlPolicy[] policies = new JackrabbitAccessControlPolicy[0]; when(delegate.getApplicablePolicies(principal)).thenReturn(policies); JackrabbitAccessControlManagerFacade facade = getFacade(delegate); assertSame("should return same array", policies, facade.getApplicablePolicies(principal)); }