@Override
  public void registerClusterListener(final LoadBalancerClusterListener listener)
  {
    trace(_log, "register listener: ", listener);

    _executor.execute(new PropertyEvent("add cluster listener for state")
    {
      @Override
      public void innerRun()
      {
        if (!_clusterListeners.contains(listener))
        {
          // don't allow duplicates, there's no need for a cluster listener to be registered twice.
          _clusterListeners.add(listener);
        }
      }
    });
  }
@Test
  public void testRegisterClusterListener()
  {
    reset();

    MockClusterListener clusterListener = new MockClusterListener();
    _state.registerClusterListener(clusterListener);
    assertEquals(clusterListener.getClusterAddedCount(CLUSTER1_CLUSTER_NAME), 0, "expected zero count since no action has been triggered");

    // first add a cluster
    _state.listenToCluster(CLUSTER1_CLUSTER_NAME, new NullStateListenerCallback());
    _clusterRegistry.put(CLUSTER1_CLUSTER_NAME, new ClusterProperties(CLUSTER1_CLUSTER_NAME));

    assertEquals(clusterListener.getClusterAddedCount(CLUSTER1_CLUSTER_NAME), 1, "expected 1 call after clusterRegistry put");

    // then update the cluster
    _clusterRegistry.put(CLUSTER1_CLUSTER_NAME, new ClusterProperties(CLUSTER1_CLUSTER_NAME));
    assertEquals(clusterListener.getClusterAddedCount(CLUSTER1_CLUSTER_NAME), 2, "expected 2 calls after additional clusterRegistry put");
  }