@Override
  public Optional<FileHashesDto> getDbFile(Component component) {
    checkState(previousFileHashesByUuid != null, "Repository not initialized");
    return Optional.ofNullable(previousFileHashesByUuid.get(component.getUuid()));
  }
@Test
  public void fail_if_not_set() {
    assertThatThrownBy(() -> previousFileHashesRepository.getDbFile(mock(Component.class))).isInstanceOf(IllegalStateException.class);
  }