@Override
  public void run() {
    try (DbSession dbSession = dbClient.openSession(false)) {
      List<AlmSettingDto> azureSettingsDtos = dbClient.almSettingDao().selectByAlm(dbSession, ALM.AZURE_DEVOPS);

      if (azureSettingsDtos.isEmpty()) {
        metrics.setAzureStatusToRed();
        return;
      }

      validate(azureSettingsDtos);
    }
  }
@Test
  public void run_azureIntegrationNotConfigured_setRedStatusInMetricsOnce() {
    when(almSettingsDao.selectByAlm(any(), any())).thenReturn(Collections.emptyList());

    underTest.run();

    verify(metrics, times(0)).setAzureStatusToGreen();
    verify(metrics, times(1)).setAzureStatusToRed();
  }