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 execution_on_windows_should_fallback_to_full_path() {
    logTester.setLevel(Level.DEBUG);
    System2 system2 = mock(System2.class);
    when(system2.isOsWindows()).thenReturn(true);

    ProcessWrapperFactory mockFactory = mock(ProcessWrapperFactory.class);
    ProcessWrapper mockProcess = mock(ProcessWrapper.class);
    mockGitWhereOnWindows(mockFactory);

    when(mockFactory.create(isNull(), any(), eq("C:\\mockGit.exe"), eq("--version"))).then(invocation -> {
      var argument = (Consumer<String>) invocation.getArgument(1);
      argument.accept("git version 2.30.1");
      return mockProcess;
    });

    NativeGitBlameCommand blameCommand = new NativeGitBlameCommand(system2, mockFactory);
    assertThat(blameCommand.checkIfEnabled()).isTrue();
    assertThat(logTester.logs()).contains("Found git.exe at C:\\mockGit.exe");
  }