AuthenticationProviderConfigurer extends SecurityConfigurerAdapter<Void, ServiceProviderBuilder> { @Override public void init(ServiceProviderBuilder builder) throws Exception { authenticationProviderBean = builder.getSharedObject(SAMLAuthenticationProvider.class); config = builder.getSharedObject(SAMLSSOProperties.class).getAuthenticationProvider(); } AuthenticationProviderConfigurer(SAMLAuthenticationProvider provider);  AuthenticationProviderConfigurer(); @Override void init(ServiceProviderBuilder builder); @Override void configure(ServiceProviderBuilder builder); AuthenticationProviderConfigurer excludeCredential(boolean excludeCredential); AuthenticationProviderConfigurer forcePrincipalAsString(boolean forcePrincipalAsString); AuthenticationProviderConfigurer userDetailsService(SAMLUserDetailsService userDetailsService);  }
@Test public void init() throws Exception { AuthenticationProviderConfigurer configurer = new AuthenticationProviderConfigurer(); configurer.init(builder); verify(builder).getSharedObject(eq(SAMLAuthenticationProvider.class)); verify(builder).getSharedObject(eq(SAMLSSOProperties.class)); }