@Test public void testIsSuper() { RoleResource role = mock(RoleResource.class); when(mockWrappedRoleManager.isSuper(eq(role))).thenReturn(true); boolean isSuper = auditRoleManager.isSuper(role); verify(mockWrappedRoleManager).isSuper(eq(role)); assertThat(isSuper).isTrue(); }
@Override public boolean isSuper(RoleResource role) { return wrappedRoleManager.isSuper(role); }
AuditRoleManager implements IRoleManager { @Override public boolean isSuper(RoleResource role) { return wrappedRoleManager.isSuper(role); } }
AuditRoleManager implements IRoleManager { @Override public boolean isSuper(RoleResource role) { return wrappedRoleManager.isSuper(role); } AuditRoleManager(); @VisibleForTesting  AuditRoleManager(IRoleManager wrappedRoleManager, AuditWhitelistManager whitelistManager, AuditAdapter auditAdapter, IAuthenticator authenticator); }
AuditRoleManager implements IRoleManager { @Override public boolean isSuper(RoleResource role) { return wrappedRoleManager.isSuper(role); } AuditRoleManager(); @VisibleForTesting  AuditRoleManager(IRoleManager wrappedRoleManager, AuditWhitelistManager whitelistManager, AuditAdapter auditAdapter, IAuthenticator authenticator); @Override void validateConfiguration(); @Override void setup(); @Override Set<? extends IResource> protectedResources(); @Override Set<Option> supportedOptions(); @Override Set<Option> alterableOptions(); @Override void createRole(AuthenticatedUser performer, RoleResource role, RoleOptions options); @Override void alterRole(AuthenticatedUser performer, RoleResource role, RoleOptions options); @Override Map<String, String> getCustomOptions(RoleResource role); @Override void grantRole(AuthenticatedUser performer, RoleResource role, RoleResource grantee); @Override void revokeRole(AuthenticatedUser performer, RoleResource role, RoleResource revokee); @Override void dropRole(AuthenticatedUser performer, RoleResource role); @Override Set<RoleResource> getRoles(RoleResource grantee, boolean includeInherited); @Override Set<RoleResource> getAllRoles(); @Override boolean isSuper(RoleResource role); @Override boolean canLogin(RoleResource role); @Override boolean isExistingRole(RoleResource role); }
AuditRoleManager implements IRoleManager { @Override public boolean isSuper(RoleResource role) { return wrappedRoleManager.isSuper(role); } AuditRoleManager(); @VisibleForTesting  AuditRoleManager(IRoleManager wrappedRoleManager, AuditWhitelistManager whitelistManager, AuditAdapter auditAdapter, IAuthenticator authenticator); @Override void validateConfiguration(); @Override void setup(); @Override Set<? extends IResource> protectedResources(); @Override Set<Option> supportedOptions(); @Override Set<Option> alterableOptions(); @Override void createRole(AuthenticatedUser performer, RoleResource role, RoleOptions options); @Override void alterRole(AuthenticatedUser performer, RoleResource role, RoleOptions options); @Override Map<String, String> getCustomOptions(RoleResource role); @Override void grantRole(AuthenticatedUser performer, RoleResource role, RoleResource grantee); @Override void revokeRole(AuthenticatedUser performer, RoleResource role, RoleResource revokee); @Override void dropRole(AuthenticatedUser performer, RoleResource role); @Override Set<RoleResource> getRoles(RoleResource grantee, boolean includeInherited); @Override Set<RoleResource> getAllRoles(); @Override boolean isSuper(RoleResource role); @Override boolean canLogin(RoleResource role); @Override boolean isExistingRole(RoleResource role);  }