class BlobExportMechanismModule extends AbstractModule {

    @VisibleForTesting
    @Provides
    @Singleton
    BlobExportImplChoice provideChoice(PropertiesProvider propertiesProvider) throws ConfigurationException {
        try {
            Configuration configuration = propertiesProvider.getConfigurations(ConfigurationComponent.NAMES);
            return BlobExportImplChoice.from(configuration)
                .orElseGet(() -> {
                    LOGGER.warn("No blob export mechanism defined. Defaulting to " + BlobExportImplChoice.LOCAL_FILE.getImplName());
                    return BlobExportImplChoice.LOCAL_FILE;
                });
        } catch (FileNotFoundException e) {
            LOGGER.warn("Could not find " + ConfigurationComponent.NAME + " configuration file, using localFile blob exporting as the default");
            return BlobExportImplChoice.LOCAL_FILE;
        }
    }

}