@Test
public void generatorTrippingTest() {

    Network network = EurostagTutorialExample1Factory.create();
    assertTrue(network.getGenerator("GEN").getTerminal().isConnected());
    GeneratorContingency tripping = new GeneratorContingency("GEN");
    Contingency contingency = new Contingency("contingency", tripping);
    ModificationTask task = contingency.toTask();
    task.modify(network, null);
    assertFalse(network.getGenerator("GEN").getTerminal().isConnected());
}