ReplicasClusterListener implements ClusterEventListener, ClusterMasterTokenTransitionListener { @Override public void processClusterEvent(ClusterEvent clusterEvent) { if (_replicasClusterContext.isMaster()) { updateNumberOfReplicas(); } } ReplicasClusterListener(
		ReplicasClusterContext replicasClusterContext); @Override void masterTokenAcquired(); @Override void masterTokenReleased(); @Override void processClusterEvent(ClusterEvent clusterEvent);  }
@Test public void testAHappyDay() { processClusterEvent(); assertReplicasChanged(); }
@Test public void testNonmasterLiferayNodeDoesNothing() { setMasterExecutor(false); processClusterEvent(); assertReplicasUnchanged(); }
@Test public void testRemoteElasticsearchClusterIsLeftAlone() { setEmbeddedCluster(false); processClusterEvent(); assertReplicasUnchanged(); }