### Question:
SamlEngineModule extends AbstractModule { @Override protected void configure() { bind(TrustStoreConfiguration.class).to(SamlEngineConfiguration.class); bind(RestfulClientConfiguration.class).to(SamlEngineConfiguration.class); bind(SamlDuplicateRequestValidationConfiguration.class).to(SamlEngineConfiguration.class); bind(SamlAuthnRequestValidityDurationConfiguration.class).to(SamlEngineConfiguration.class); bind(Client.class).toProvider(DefaultClientProvider.class).asEagerSingleton(); bind(EntityToEncryptForLocator.class).to(AssignableEntityToEncryptForLocator.class); bind(AssignableEntityToEncryptForLocator.class).asEagerSingleton(); bind(ReplayCacheStartupTasks.class).asEagerSingleton(); bind(ConfigServiceKeyStore.class).asEagerSingleton(); bind(JsonResponseProcessor.class); bind(RpErrorResponseGeneratorService.class); bind(TransactionsConfigProxy.class); bind(MatchingServiceHealthcheckRequestGeneratorService.class); bind(ExpiredCertificateMetadataFilter.class).toInstance(new ExpiredCertificateMetadataFilter()); bind(new TypeLiteral<LevelLoggerFactory<SamlEngineExceptionMapper>>() {}) .toInstance(new LevelLoggerFactory<>()); bind(OutboundResponseFromHubToResponseTransformerFactory.class); bind(SimpleProfileOutboundResponseFromHubToResponseTransformerProvider.class); bind(SimpleProfileOutboundResponseFromHubToSamlResponseTransformer.class); bind(ResponseToUnsignedStringTransformer.class); bind(ResponseAssertionSigner.class); bind(SimpleProfileTransactionIdaStatusMarshaller.class); bind(EncryptedAssertionUnmarshaller.class).toInstance(hubTransformersFactory.getEncryptedAssertionUnmarshaller()); bind(IdpAuthnResponseTranslatorService.class); bind(InboundResponseFromIdpDataGenerator.class); bind(MatchingServiceRequestGeneratorService.class); bind(HubAttributeQueryRequestBuilder.class); bind(MatchingServiceResponseTranslatorService.class); bind(RpAuthnRequestTranslatorService.class); bind(RpAuthnResponseGeneratorService.class); bind(IdpAuthnRequestGeneratorService.class); bind(IdaAuthnRequestTranslator.class); bind(EidasAuthnRequestTranslator.class); bind(MatchingServiceHealthcheckResponseTranslatorService.class); }  @Provides PassthroughAssertionUnmarshaller getPassthroughAssertionUnmarshaller(); @Provides Optional<DestinationValidator> getValidateSamlResponseIssuedByIdpDestination(@Named("ExpectedEidasDestination") Optional<URI> expectedDestination); @Provides @Singleton Optional<EidasValidatorFactory> getEidasValidatorFactory(Optional<EidasMetadataResolverRepository> eidasMetadataResolverRepository, SamlEngineConfiguration configuration); @Provides @Singleton Optional<CountrySingleSignOnServiceHelper> getCountrySingleSignOnServiceHelper(Optional<EidasMetadataResolverRepository> eidasMetadataResolverRepository, SamlEngineConfiguration configuration); @Provides @Singleton Optional<EidasTrustAnchorHealthCheck> getCountryMetadataHealthCheck(
        Optional<EidasMetadataResolverRepository> metadataResolverRepository,
        Environment environment); static final String COUNTRY_METADATA_HEALTH_CHECK; static final String EIDAS_HUB_ENTITY_ID_NOT_CONFIGURED_ERROR_MESSAGE; static final String VERIFY_METADATA_RESOLVER; static final String FED_METADATA_ENTITY_SIGNATURE_VALIDATOR; static final String VERIFY_METADATA_SIGNATURE_TRUST_ENGINE; }### Answer:
@Test public void configure() { SamlEngineModule sem = new SamlEngineModule(); when(binder.bind(any(Class.class))).thenReturn(builder); when(binder.bind(any(TypeLiteral.class))).thenReturn(builder); when(builder.toProvider(any(Class.class))).thenReturn(scopedBindingBuilder); sem.configure(binder); verify(binder).bind(TrustStoreConfiguration.class); }