@Test
public void testAutomaticList() throws IOException {

    writeToDslFile("for (l in network.lines) {",
            "    contingency(l.id) {",
            "        equipments l.id",
            "    }",
            "}");
    List<Contingency> contingencies = new GroovyDslContingenciesProvider(dslFile)
            .getContingencies(network);
    assertEquals(2, contingencies.size());
    assertEquals(Sets.newHashSet("NHV1_NHV2_1", "NHV1_NHV2_2"), getContingenciesNames(contingencies));
}