@Test
public void doNotInsertSameLinkOrUrlTwice() throws Exception {

    Element mdAsXml = getMdAsXml();
    AbstractMetadata md = insertMetadataInDb(mdAsXml);
    Xml.selectElement(mdAsXml, ".//gmd:abstract/gco:CharacterString")
            .setText("http://temporary_ressource_when_network_switch.org je répète http://temporary_ressource_when_network_switch.org");
    UrlAnalyzer toTest = createToTest();
    toTest.processMetadata(mdAsXml, md);
    List<Link> urlFromDb = linkRepository.findAll();
    assertEquals(5, urlFromDb.size());
    List<MetadataLink> metadataLinkList = metadataLinkRepository.findAll();
    assertEquals(5, metadataLinkList.size());
}