@Test
public void testEmpty() {

    ContingenciesProvider provider = n -> Collections.emptyList();
    Network network = Mockito.mock(Network.class);
    List<String> subList1 = new SubContingenciesProvider(provider, new Partition(1, 1))
            .getContingencies(network)
            .stream().map(Contingency::getId).collect(Collectors.toList());
    assertEquals(Collections.emptyList(), subList1);
}