  @Test
  final void resolveMentionOverlappingHappy7() {

    final AnnotatorConfig config1 = new AnnotatorConfig();
    
    config1.setName("ann1");
    config1.setFrom("CoNLL");
    
    final AnnotatorConfig config2 = new AnnotatorConfig();
    
    config2.setName("ann2");
    config2.setFrom("CoNLL");
    
    final Entity entity1 = Entity.builder().phrase("United States of America").cleanPhrase("United States of America").startOffset(0).endOffset(24).type("LOCATION").build();
    final Entity entity2 = Entity.builder().phrase("States").cleanPhrase("States").startOffset(7).endOffset(13).type("").build();
    final Document doc1 = Document.builder().entities(Collections.singletonList(entity1)).text("United States of America").build();
    final Document doc2 = Document.builder().entities(Collections.singletonList(entity2)).text("United States of America").build();
    final Map<AnnotatorConfig, List<Entity>> documents = new HashMap<>();
    
    documents.put(config1, doc1.getEntities());
    documents.put(config2, doc2.getEntities());
    
    final MentionOverlapResolutionRepository mergeMentionOverlapResolution = new MergeMentionOverlapResolution();
    final List<Entity> newEntities = mergeMentionOverlapResolution.resolveMentionOverlapping(documents);
  
    Assertions.assertEquals(1, newEntities.size(), "Must be equals");
    Assertions.assertEquals(0, newEntities.get(0).getStartOffset().intValue(), "Must be equals");
    Assertions.assertEquals(24, newEntities.get(0).getEndOffset().intValue(), "Must be equals");
    Assertions.assertTrue("LOCATIONfromCoNLL--ann2".equals(newEntities.get(0).getType()) || "LOCATIONfromCoNLL--ann1".equals(newEntities.get(0).getType()), "Must be equals");
    Assertions.assertEquals("United States of America", newEntities.get(0).getPhrase(), "Must be equals");
    Assertions.assertEquals("United States of America", newEntities.get(0).getCleanPhrase(), "Must be equals");
  }