MetadataGeneratorConfigurer extends SecurityConfigurerAdapter<Void, ServiceProviderBuilder> { @Override public void init(ServiceProviderBuilder builder) throws Exception { config = builder.getSharedObject(SAMLSSOProperties.class).getMetadataGenerator(); endpoints = builder.getSharedObject(ServiceProviderEndpoints.class); metadataGeneratorBean = builder.getSharedObject(MetadataGenerator.class); } MetadataGeneratorConfigurer();  MetadataGeneratorConfigurer(MetadataGenerator metadataGenerator); @Override void init(ServiceProviderBuilder builder); @Override void configure(ServiceProviderBuilder builder); MetadataGeneratorConfigurer metadataURL(String metadataURL); MetadataGeneratorConfigurer entityId(String entityId); MetadataGeneratorConfigurer id(String id); MetadataGeneratorConfigurer wantAssertionSigned(Boolean wantAssertionSigned); MetadataGeneratorConfigurer requestSigned(Boolean requestSigned); MetadataGeneratorConfigurer nameId(String... nameId); MetadataGeneratorConfigurer entityBaseURL(String entityBaseURL); MetadataGeneratorConfigurer bindingsHoKSSO(String... bindingsHoKSSO); MetadataGeneratorConfigurer bindingsSLO(String... bindingsSLO); MetadataGeneratorConfigurer bindingsSSO(String... bindingsSSO); MetadataGeneratorConfigurer assertionConsumerIndex(Integer assertionConsumerIndex); MetadataGeneratorConfigurer includeDiscoveryExtension(Boolean includeDiscoveryExtension);  }
@Test public void init() throws Exception { MetadataGeneratorConfigurer configurer = new MetadataGeneratorConfigurer(); configurer.init(builder); verify(builder).getSharedObject(eq(ServiceProviderEndpoints.class)); verify(builder).getSharedObject(eq(SAMLSSOProperties.class)); verify(properties).getMetadataGenerator(); }