SecurityAnalysisPreprocessors { public static Optional<SecurityAnalysisPreprocessorFactory> configuredFactory(PlatformConfig platformConfig) { return configuredFactory(SecurityAnalysisConfig.load(platformConfig)); } private  SecurityAnalysisPreprocessors(); static SecurityAnalysisPreprocessorFactory factoryForName(String name); static Optional<SecurityAnalysisPreprocessorFactory> defaultConfiguredFactory(); static Optional<SecurityAnalysisPreprocessorFactory> configuredFactory(PlatformConfig platformConfig); static Optional<SecurityAnalysisPreprocessorFactory> configuredFactory(SecurityAnalysisConfig config); static SecurityAnalysisPreprocessorFactory wrap(ContingenciesProviderFactory factory); static SecurityAnalysisPreprocessor contingenciesPreprocessor(ContingenciesProviderFactory factory,
                                                                   ByteSource source);  }
@Test public void configuredFactory() { Optional<SecurityAnalysisPreprocessorFactory> factory = SecurityAnalysisPreprocessors.configuredFactory(new SecurityAnalysisConfig("test")); assertThat(factory) .isPresent() .get() .isInstanceOf(TestPreprocessorFactory.class); factory = SecurityAnalysisPreprocessors.configuredFactory(new SecurityAnalysisConfig()); assertThat(factory).isNotPresent(); }