@Test
public void testFailure() {

    thrown.expect(PowsyblException.class);
    thrown.expectMessage("The active power of 'NHV1_NHV2_1' (VLHV1) is not set. Do you forget to compute the flows?");
    Network network = EurostagTutorialExample1Factory.create();
    NetworkReducer reducer = NetworkReducer.builder()
            .withNetworkPredicate(IdentifierNetworkPredicate.of("P1"))
            .build();
    reducer.reduce(network);
}