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_whenAppIdIsNull_shouldReturnFailedAppCheck() {
    when(gitHubSettings.appId()).thenReturn(null);

    ConfigCheckResult checkResult = configValidator.checkConfig();

    assertThat(checkResult.application().autoProvisioning()).isEqualTo(ConfigStatus.failed(INVALID_APP_ID_STATUS));
    assertThat(checkResult.application().jit()).isEqualTo(ConfigStatus.failed(INVALID_APP_ID_STATUS));
    assertThat(checkResult.installations()).isEmpty();
  }