@Override
  public Optional<ReadError> read(DbFileSources.Line.Builder lineBuilder) {
    if (readError == null) {
      try {
        processHighlightings(lineBuilder);
      } catch (RangeOffsetConverterException e) {
        readError = new ReadError(HIGHLIGHTING, lineBuilder.getLine());
        LOG.debug(format("Inconsistency detected in Highlighting data. Highlighting will be ignored for file '%s'", file.getKey()), e);
      }
    }
    return Optional.ofNullable(readError);
  }
@Test
  public void read_one_line() {
    HighlightingLineReader highlightingLineReader = newReader(of(
      newSingleLineTextRangeWithExpectingLabel(LINE_1, RANGE_LABEL_1), ANNOTATION));

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

    assertThat(line1.getHighlighting()).isEqualTo(RANGE_LABEL_1 + ",a");
  }