@Test
public void checkAliasesCreationAfterIidmMerging() {

    Network networkFR = loadNetworkFromResourceFile("/frTestGridForMerging.uct");
    Network networkBE = loadNetworkFromResourceFile("/beTestGridForMerging.uct");
    Network merge = Network.create("merge", "UCT");
    merge.merge(networkBE, networkFR);
    // No aliases on dangling lines element name
    assertNull(merge.getIdentifiable("BBBBBB11 XXXXXX11 ABCDE"));
    assertNull(merge.getIdentifiable("FFFFFF11 XXXXXX11 ABCDE"));
    // Aliases on disappeared dangling lines ids are created
    assertNotNull(merge.getIdentifiable("BBBBBB11 XXXXXX11 1"));
    assertNotNull(merge.getIdentifiable("FFFFFF11 XXXXXX11 1"));
    assertNotEquals("BBBBBB11 XXXXXX11 1", merge.getIdentifiable("BBBBBB11 XXXXXX11 1").getId());
    assertNotEquals("FFFFFF11 XXXXXX11 1", merge.getIdentifiable("FFFFFF11 XXXXXX11 1").getId());
    UcteAliasesCreation.createAliases(merge);
    // Aliases on element name have been created
    assertNotNull(merge.getIdentifiable("BBBBBB11 XXXXXX11 ABCDE"));
    assertNotNull(merge.getIdentifiable("FFFFFF11 XXXXXX11 ABCDE"));
    // Aliases on disappeared dangling lines are still there
    assertNotNull(merge.getIdentifiable("BBBBBB11 XXXXXX11 1"));
    assertNotNull(merge.getIdentifiable("FFFFFF11 XXXXXX11 1"));
    // They are all referencing the same identifiable
    assertEquals(merge.getIdentifiable("BBBBBB11 XXXXXX11 ABCDE"), merge.getIdentifiable("FFFFFF11 XXXXXX11 ABCDE"));
    assertEquals(merge.getIdentifiable("BBBBBB11 XXXXXX11 ABCDE"), merge.getIdentifiable("BBBBBB11 XXXXXX11 1"));
    assertEquals(merge.getIdentifiable("FFFFFF11 XXXXXX11 ABCDE"), merge.getIdentifiable("FFFFFF11 XXXXXX11 1"));
}