@Override
  public DarkClusterConfigMap getDarkClusterConfigMap(String clusterName) throws ServiceUnavailableException
  {
    FutureCallback<DarkClusterConfigMap> darkClusterConfigMapFutureCallback = new FutureCallback<>();
    getDarkClusterConfigMap(clusterName, darkClusterConfigMapFutureCallback);

    try
    {
      return darkClusterConfigMapFutureCallback.get(_timeout, _unit);
    }
    catch (ExecutionException | TimeoutException | IllegalStateException | InterruptedException e)
    {
      if (e instanceof TimeoutException || e.getCause() instanceof TimeoutException)
      {
        DarkClusterConfigMap darkClusterConfigMap = getDarkClusterConfigMapFromCache(clusterName);
        if (darkClusterConfigMap != null)
        {
          _log.info("Got dark cluster config map for {} timed out, used cached value instead.", clusterName);
          return darkClusterConfigMap;
        }
      }
      die("ClusterInfo",
          "PEGA_1018, unable to retrieve dark cluster info for cluster: " + clusterName + ", exception" + ": " + e);
      return new DarkClusterConfigMap();
    }
  }
@Test
  public void testClusterInfoProviderGetDarkClustersNoUris()
      throws InterruptedException, ExecutionException, ServiceUnavailableException
  {
    MockStore<ServiceProperties> serviceRegistry = new MockStore<>();
    MockStore<ClusterProperties> clusterRegistry = new MockStore<>();
    MockStore<UriProperties> uriRegistry = new MockStore<>();
    SimpleLoadBalancer loadBalancer = setupLoadBalancer(serviceRegistry, clusterRegistry, uriRegistry);

    DarkClusterConfig darkClusterConfig = new DarkClusterConfig()
        .setMultiplier(1.0f)
        .setDispatcherOutboundTargetRate(1)
        .setDispatcherMaxRequestsToBuffer(1)
        .setDispatcherBufferedRequestExpiryInSeconds(1);
    DarkClusterConfigMap darkClusterConfigMap = new DarkClusterConfigMap();
    darkClusterConfigMap.put(DARK_CLUSTER1_NAME, darkClusterConfig);

    clusterRegistry.put(CLUSTER1_NAME, new ClusterProperties(CLUSTER1_NAME, Collections.emptyList(), Collections.emptyMap(),
        Collections.emptySet(), NullPartitionProperties.getInstance(), Collections.emptyList(),
                                                             DarkClustersConverter.toProperties(darkClusterConfigMap), false));

    loadBalancer.getDarkClusterConfigMap(CLUSTER1_NAME, new Callback<DarkClusterConfigMap>()
    {
      @Override
      public void onError(Throwable e)
      {
        Assert.fail("getDarkClusterConfigMap threw exception", e);
      }

      @Override
      public void onSuccess(DarkClusterConfigMap returnedDarkClusterConfigMap)
      {
        Assert.assertEquals(returnedDarkClusterConfigMap, darkClusterConfigMap, "dark cluster configs should be equal");
        Assert.assertEquals(returnedDarkClusterConfigMap.get(DARK_CLUSTER1_NAME).getMultiplier(), 1.0f, "multiplier should match");
      }
    });
  }