@Override
  public int getLineHashesVersion(Component component) {
    if (significantCodeRepository.getRangesPerLine(component).isPresent()) {
      return LineHashVersion.WITH_SIGNIFICANT_CODE.getDbValue();
    } else {
      return LineHashVersion.WITHOUT_SIGNIFICANT_CODE.getDbValue();
    }
  }
@Test
  public void should_return_version_of_line_hashes_with_significant_code_in_the_report() {
    LineRange[] lineRanges = {new LineRange(0, 1), null, new LineRange(1, 5)};
    when(significantCodeRepository.getRangesPerLine(file)).thenReturn(Optional.of(lineRanges));
    assertThat(underTest.getLineHashesVersion(file)).isEqualTo(LineHashVersion.WITH_SIGNIFICANT_CODE.getDbValue());

    verify(significantCodeRepository).getRangesPerLine(file);
    verifyNoMoreInteractions(significantCodeRepository);
    verifyNoInteractions(dbLineHashVersion);
  }