@Test
public void cascadeDontFordbidMetadalinkDeletion() throws Exception {

    Element mdAsXml = getMdAsXml();
    AbstractMetadata md = insertMetadataInDb(mdAsXml);
    UrlAnalyzer toTest = createToTest();
    toTest.processMetadata(mdAsXml, md);
    toTest.processMetadata(mdAsXml, md);
    List<Link> urlFromDb = linkRepository.findAll();
    assertEquals(6, urlFromDb.size());
    List<MetadataLink> metadataLinkList = metadataLinkRepository.findAll();
    assertEquals(6, metadataLinkList.size());
}