InternalSecurityProvider implements SecurityProvider, WhiteboardAware { public void setAuthorizationConfiguration(AuthorizationConfiguration authorizationConfiguration) { this.authorizationConfiguration = authorizationConfiguration; }  @NotNull @Override ConfigurationParameters getParameters(@Nullable String name); @NotNull @Override Iterable<? extends SecurityConfiguration> getConfigurations(); @NotNull @Override @SuppressWarnings("unchecked") T getConfiguration(@NotNull Class<T> configurationClass); @Override void setWhiteboard(@NotNull Whiteboard whiteboard); @Override Whiteboard getWhiteboard(); void setAuthenticationConfiguration(AuthenticationConfiguration authenticationConfiguration); void setAuthorizationConfiguration(AuthorizationConfiguration authorizationConfiguration); void setUserConfiguration(UserConfiguration userConfiguration); void setPrivilegeConfiguration(PrivilegeConfiguration privilegeConfiguration); void setPrincipalConfiguration(PrincipalConfiguration principalConfiguration); void setTokenConfiguration(TokenConfiguration tokenConfiguration);  }
@Test public void testSetAuthorizationConfiguration() { AuthorizationConfiguration ac = Mockito.mock(AuthorizationConfiguration.class); when(ac.getParameters()).thenReturn(PARAMS); securityProvider.setAuthorizationConfiguration(ac); assertSame(ac, securityProvider.getConfiguration(AuthorizationConfiguration.class)); for (SecurityConfiguration sc : securityProvider.getConfigurations()) { if (sc instanceof AuthorizationConfiguration) { assertSame(ac, sc); } } assertEquals(PARAMS, securityProvider.getParameters(AuthorizationConfiguration.NAME)); }