public boolean checkIfEnabled() {
    try {
      this.gitCommand = locateDefaultGit();
      MutableString stdOut = new MutableString();
      this.processWrapperFactory.create(null, l -> stdOut.string = l, gitCommand, "--version").execute();
      return stdOut.string != null && stdOut.string.startsWith("git version") && isCompatibleGitVersion(stdOut.string);
    } catch (Exception e) {
      LOG.debug("Failed to find git native client", e);
      return false;
    }
  }
@Test
  public void git_should_not_be_enabled_if_version_command_does_not_return_string_output() {
    ProcessWrapperFactory mockedCmd = mockGitVersionCommand(null);
    NativeGitBlameCommand blameCommand = new NativeGitBlameCommand(System2.INSTANCE, mockedCmd);
    assertThat(blameCommand.checkIfEnabled()).isFalse();
  }