@Override
  public BlameAlgorithmEnum getBlameAlgorithm(int availableProcessors, int numberOfFiles) {
    BlameAlgorithmEnum forcedStrategy = configuration.get(PROP_SONAR_SCM_USE_BLAME_ALGORITHM)
      .map(BlameAlgorithmEnum::valueOf)
      .orElse(null);

    if (forcedStrategy != null) {
      return forcedStrategy;
    }

    if (availableProcessors == 0) {
      LOG.warn("Available processors are 0. Falling back to native git blame");
      return GIT_NATIVE_BLAME;
    }
    if (numberOfFiles / availableProcessors > FILES_GIT_BLAME_TRIGGER) {
      return GIT_FILES_BLAME;
    }

    return GIT_NATIVE_BLAME;
  }
@Test
  public void useRepositoryBlame_whenFileBlamePropsDisableOrUnspecified_shouldEnableRepoBlame() {
    when(configuration.get(DefaultBlameStrategy.PROP_SONAR_SCM_USE_BLAME_ALGORITHM)).thenReturn(Optional.of(GIT_NATIVE_BLAME.name()));

    assertThat(underTest.getBlameAlgorithm(1, 10000)).isEqualTo(GIT_NATIVE_BLAME);

  }