@Override
  public String getRawSourceHash(Component file) {
    checkComponentArgument(file);
    if (rawSourceHashesByKey.containsKey(file.getKey())) {
      return checkSourceHash(file.getKey(), rawSourceHashesByKey.get(file.getKey()));
    } else {
      String newSourceHash = computeRawSourceHash(file);
      rawSourceHashesByKey.put(file.getKey(), newSourceHash);
      return checkSourceHash(file.getKey(), newSourceHash);
    }
  }
@Test
  void getRawSourceHash_reads_lines_from_SourceLinesRepository_only_the_first_time() {
    when(mockedSourceLinesRepository.readLines(FILE_COMPONENT)).thenReturn(CloseableIterator.from(Arrays.asList(SOME_LINES).iterator()));

    String rawSourceHash = mockedUnderTest.getRawSourceHash(FILE_COMPONENT);
    String rawSourceHash1 = mockedUnderTest.getRawSourceHash(FILE_COMPONENT);

    assertThat(rawSourceHash).isSameAs(rawSourceHash1);
    verify(mockedSourceLinesRepository, times(1)).readLines(FILE_COMPONENT);
  }