KeyManagerConfigurer extends SecurityConfigurerAdapter<Void, ServiceProviderBuilder> { @Override public void init(ServiceProviderBuilder builder) throws Exception { keyManagerBean = builder.getSharedObject(KeyManager.class); config = builder.getSharedObject(SAMLSSOProperties.class).getKeyManager(); resourceLoader = builder.getSharedObject(ResourceLoader.class); keystoreFactory = new KeystoreFactory(resourceLoader); } KeyManagerConfigurer(KeyManager keyManager);  KeyManagerConfigurer(); @Override void init(ServiceProviderBuilder builder); @Override void configure(ServiceProviderBuilder builder); KeyManagerConfigurer keyStore(KeyStore keyStore); KeyManagerConfigurer publicKeyPEMLocation(String publicKeyPEMLocation); KeyManagerConfigurer privateKeyDERLocation(String privateKeyDERLocation); KeyManagerConfigurer storeLocation(String storeLocation); KeyManagerConfigurer storePass(String storePass); KeyManagerConfigurer keyPasswords(Map<String, String> keyPasswords); KeyManagerConfigurer keyPassword(String key, String password); KeyManagerConfigurer defaultKey(String defaultKey);  }
@Test public void init() throws Exception { KeyManagerConfigurer configurer = new KeyManagerConfigurer(); configurer.init(builder); verify(builder).getSharedObject(eq(KeyManager.class)); verify(builder).getSharedObject(eq(SAMLSSOProperties.class)); }