@Test
public void contingenciesProviderPreprocessor() {

    ContingenciesProvider provider = Mockito.mock(ContingenciesProvider.class);
    ContingenciesProviderFactory providerFactory = () -> provider;
    SecurityAnalysisPreprocessorFactory factory = new ContingenciesProviderPreprocessorFactory(providerFactory);
    assertEquals("default", factory.getName());
    SecurityAnalysisPreprocessor preprocessor = factory.newPreprocessor(ByteSource.wrap("".getBytes()));
    SecurityAnalysisInput input = new SecurityAnalysisInput(Mockito.mock(Network.class), "variant");
    preprocessor.preprocess(input);
    assertSame(provider, input.getContingenciesProvider());
}