ClusterSyncManager { public String initializedGroupStatus() throws Exception { String status = null; if (clusteringEnabled) { initClusterNodeStatus(); status = updateNodeStatus(); } return status; } ClusterSyncManager(String latchpath, String id, ConfigurationContext
            configurationContext, FailOverTask failOverTask, CuratorFramework curatorClient, ZKUtils zkUtils,
            ClusterBarrierManager clusterBarrierManager);  ClusterSyncManager(String latchpath, String id, ConfigurationContext
            configurationContext, FailOverTask failOverTask); static ClusterSyncManager getClusterSyncManager(ConfigurationContext configurationContext,
            FailOverTask failOverTask); static ClusterSyncManager getNode(); void start(); boolean isStarted(); ActionCallbackDto manageAckStreamingOperation(StratioStreamingMessage message, ActionCallbackDto reply); String initializedNodeStatus(); String initializedGroupStatus(); String updateNodeStatus(String nodeId, PathChildrenCacheEvent.Type eventType); boolean isLeader(); CuratorFramework getClient(); String getGroupId();  }
@Test public void testInitializedGroupStatusShouldBeInitilized() throws Exception { doNothing().when(zkUtils).createEphemeralZNode(anyString(), any(byte[].class)); when(zkUtils.existZNode(contains("group1"))).thenReturn(true); when(zkUtils.existZNode(contains("group2"))).thenReturn(true); assertEquals( STREAMING.ZK_EPHEMERAL_NODE_STATUS_INITIALIZED, clusterSyncManager.initializedGroupStatus()); }
@Test public void testInitializedGroupStatusShouldBeGroupsDown() throws Exception { doNothing().when(zkUtils).createEphemeralZNode(anyString(), any(byte[].class)); when(zkUtils.existZNode(contains("group1"))).thenReturn(true); when(zkUtils.existZNode(contains("group2"))).thenReturn(false); assertEquals(STREAMING.ZK_EPHEMERAL_NODE_STATUS_GROUPS_DOWN, clusterSyncManager.initializedGroupStatus()) ; }