InternalSecurityProvider implements SecurityProvider, WhiteboardAware { public void setTokenConfiguration(TokenConfiguration tokenConfiguration) { this.tokenConfiguration = tokenConfiguration; }  @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 testSetTokenConfiguration() { TokenConfiguration tc = Mockito.mock(TokenConfiguration.class); when(tc.getParameters()).thenReturn(PARAMS); securityProvider.setTokenConfiguration(tc); assertSame(tc, securityProvider.getConfiguration(TokenConfiguration.class)); for (SecurityConfiguration sc : securityProvider.getConfigurations()) { if (sc instanceof TokenConfiguration) { assertSame(tc, sc); } } assertEquals(PARAMS, securityProvider.getParameters(TokenConfiguration.NAME)); }