public ConfigCheckResult checkConfig() {
    Optional<Long> appId = getAppId();
    if (appId.isEmpty()) {
      return failedApplicationStatus(INVALID_APP_ID_STATUS);
    }
    GithubAppConfiguration githubAppConfiguration = new GithubAppConfiguration(appId.get(), gitHubSettings.privateKey(), gitHubSettings.apiURLOrDefault());
    return checkConfig(githubAppConfiguration);
  }
@Test
  public void checkConfig_whenInstallationSuspended_shouldReturnFailedInstallationAutoProvisioningCheck() {
    mockGithubConfiguration();
    ArgumentCaptor<GithubAppConfiguration> appConfigurationCaptor = ArgumentCaptor.forClass(GithubAppConfiguration.class);
    mockGithubAppWithValidConfig(appConfigurationCaptor);

    mockSuspendedOrganizations("org1");
    ConfigCheckResult checkResult = configValidator.checkConfig();

    assertSuccessfulAppConfig(checkResult);
    assertThat(checkResult.installations())
      .extracting(InstallationStatus::organization, InstallationStatus::autoProvisioning)
      .containsExactly(tuple("org1", ConfigStatus.failed(SUSPENDED_INSTALLATION)));
    verify(githubClient).getWhitelistedGithubAppInstallations(appConfigurationCaptor.capture());
    verifyAppConfiguration(appConfigurationCaptor.getValue());
  }