@Override
  public Optional<ReadError> read(DbFileSources.Line.Builder lineBuilder) {
    Predicate<Map.Entry<TextBlock, Integer>> containsLine = new TextBlockContainsLine(lineBuilder.getLine());
    // list is sorted to cope with the non-guaranteed order of Map entries which would trigger false detection of changes
    // in {@link DbFileSources.Line#getDuplicationList()}
    duplicatedTextBlockIndexByTextBlock.entrySet().stream()
      .filter(containsLine)
      .map(Map.Entry::getValue)
      .sorted(Comparator.naturalOrder())
      .forEach(lineBuilder::addDuplication);

    return Optional.empty();
  }
@Test
  public void read_nothing() {
    DuplicationLineReader reader = new DuplicationLineReader(Collections.emptySet());

    assertThat(reader.read(line1)).isEmpty();

    assertThat(line1.getDuplicationList()).isEmpty();
  }