@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_returns_hash_of_lines_from_SourceLinesRepository() {
    sourceLinesRepository.addLines(FILE_REF, SOME_LINES);

    String rawSourceHash = underTest.getRawSourceHash(FILE_COMPONENT);

    SourceHashComputer sourceHashComputer = new SourceHashComputer();
    for (int i = 0; i < SOME_LINES.length; i++) {
      sourceHashComputer.addLine(SOME_LINES[i], i < (SOME_LINES.length - 1));
    }

    assertThat(rawSourceHash).isEqualTo(sourceHashComputer.getHash());
  }