@Test public void testGetApplicablePolicies() throws Exception { AccessControlManager delegate = mock(AccessControlManager.class); AccessControlManagerFacade<AccessControlManager> facade = getFacade(delegate); final AccessControlPolicyIterator value = mock(AccessControlPolicyIterator.class); final String path = "/correct/path"; when(delegate.getApplicablePolicies(path)).thenReturn(value); assertSame("is same value", value, facade.getApplicablePolicies(path)); }
@Override public final AccessControlPolicyIterator getApplicablePolicies(String absPath) throws RepositoryException { return delegate.getApplicablePolicies(absPath); }
AccessControlManagerFacade implements AccessControlManager { @Override public final AccessControlPolicyIterator getApplicablePolicies(String absPath) throws RepositoryException { return delegate.getApplicablePolicies(absPath); } }
AccessControlManagerFacade implements AccessControlManager { @Override public final AccessControlPolicyIterator getApplicablePolicies(String absPath) throws RepositoryException { return delegate.getApplicablePolicies(absPath); } @SuppressWarnings("WeakerAccess")  AccessControlManagerFacade(final @NotNull M delegate); }
AccessControlManagerFacade implements AccessControlManager { @Override public final AccessControlPolicyIterator getApplicablePolicies(String absPath) throws RepositoryException { return delegate.getApplicablePolicies(absPath); } @SuppressWarnings("WeakerAccess")  AccessControlManagerFacade(final @NotNull M delegate); static @Nullable AccessControlManager findBestWrapper(final @Nullable AccessControlManager manager); @Override final Privilege[] getSupportedPrivileges(String absPath); @Override final Privilege privilegeFromName(String privilegeName); @Override final boolean hasPrivileges(String absPath, Privilege[] privileges); @Override final Privilege[] getPrivileges(String absPath); @Override final AccessControlPolicy[] getPolicies(String absPath); @Override final AccessControlPolicy[] getEffectivePolicies(String absPath); @Override final AccessControlPolicyIterator getApplicablePolicies(String absPath); @Override final void setPolicy(String absPath, AccessControlPolicy policy); @Override final void removePolicy(String absPath, AccessControlPolicy policy); }
AccessControlManagerFacade implements AccessControlManager { @Override public final AccessControlPolicyIterator getApplicablePolicies(String absPath) throws RepositoryException { return delegate.getApplicablePolicies(absPath); } @SuppressWarnings("WeakerAccess")  AccessControlManagerFacade(final @NotNull M delegate); static @Nullable AccessControlManager findBestWrapper(final @Nullable AccessControlManager manager); @Override final Privilege[] getSupportedPrivileges(String absPath); @Override final Privilege privilegeFromName(String privilegeName); @Override final boolean hasPrivileges(String absPath, Privilege[] privileges); @Override final Privilege[] getPrivileges(String absPath); @Override final AccessControlPolicy[] getPolicies(String absPath); @Override final AccessControlPolicy[] getEffectivePolicies(String absPath); @Override final AccessControlPolicyIterator getApplicablePolicies(String absPath); @Override final void setPolicy(String absPath, AccessControlPolicy policy); @Override final void removePolicy(String absPath, AccessControlPolicy policy);  }