@Test
public void testReadyCountDownForMemberUpAfterLeaderStateChanged() throws Exception {

    final TestKit kit = new TestKit(getSystem());
    TestShardManager shardManager = newTestShardManager();
    String memberId = "member-1-shard-default-" + shardMrgIDSuffix;
    shardManager.handleCommand(new RoleChangeNotification(memberId, null, RaftState.Follower.name()));
    assertFalse(ready.isDone());
    shardManager.handleCommand(
        new ShardLeaderStateChanged(memberId, "member-2-shard-default-" + shardMrgIDSuffix,
            mock(DataTree.class), DataStoreVersions.CURRENT_VERSION));
    shardManager.handleCommand(MockClusterWrapper.createMemberUp("member-2", kit.getRef().path().toString()));
    assertTrue(ready.isDone());
}