@Test
public void test3WT() {

    Network network = ThreeWindingsTransformerNetworkFactory.create();
    assertEquals(1, network.getThreeWindingsTransformerCount());
    NetworkReducerObserverImpl observer = new NetworkReducerObserverImpl();
    // Keeping all the ends of the 3WT is OK
    NetworkReducer reducer = NetworkReducer.builder()
            .withNetworkPredicate(IdentifierNetworkPredicate.of("VL_132", "VL_33", "VL_11"))
            .withObservers(observer)
            .build();
    reducer.reduce(network);
    assertEquals(1, network.getThreeWindingsTransformerCount());
    assertEquals(0, observer.getThreeWindingsTransformerReplacedCount());
    assertEquals(0, observer.getThreeWindingsTransformerRemovedCount());
    // Keeping none of the ends of the 3WT is OK
    reducer = NetworkReducer.builder()
            .withNetworkPredicate(new IdentifierNetworkPredicate(Collections.emptyList()))
            .withObservers(Collections.singleton(observer))
            .build();
    reducer.reduce(network);
    assertEquals(0, network.getThreeWindingsTransformerCount());
    assertEquals(0, observer.getThreeWindingsTransformerReplacedCount());
    assertEquals(1, observer.getThreeWindingsTransformerRemovedCount());
}