@Override
  public CloudDestination getCloudDestination() throws IllegalStateException, ReflectiveOperationException {
    if (cloudConfig.ambryBackupVersion.equals(CloudConfig.AMBRY_BACKUP_VERSION_1)) {
      try {
        AzureCloudDestination dest =
            new AzureCloudDestination(cloudConfig, azureCloudConfig, clusterName, vcrMetrics, azureMetrics,
                getReplicationFeedType(verifiableProperties), clusterMap);
        dest.testAzureConnectivity();
        return dest;
      } catch (Exception e) {
        logger.error("Error initializing Azure destination: {}", e.getMessage());
        throw (e instanceof IllegalStateException) ? (IllegalStateException) e : new IllegalStateException(e);
      }
    } else if (cloudConfig.ambryBackupVersion.equals(CloudConfig.AMBRY_BACKUP_VERSION_2)) {
      return new AzureCloudDestinationSync(verifiableProperties, metricRegistry, clusterMap, accountService);
    }  else {
      // Invalid backup version
      throw new RuntimeException(String.format("Invalid azure backup version %s", cloudConfig.ambryBackupVersion));
    }
  }
Constructor for {@link AzureCloudDestinationFactory}
@param verifiableProperties properties containing configs.
@param metricRegistry metric registry.
@param clusterMap Cluster map object
ambry-cloud/src/main/java/com/github/ambry/cloud/azure/AzureCloudDestinationFactory.java