HazelcastInstance h1 = Hazelcast.newHazelcastInstance(config);
HazelcastInstance h2 = Hazelcast.newHazelcastInstance(config);
HazelcastInstance h3 = Hazelcast.newHazelcastInstance(config);
final String name = generateKeyOwnedBy(h3);
ICountDownLatch countDownLatch = h3.getCountDownLatch(name);
countDownLatch.trySetCount(5);
TestMemberShipListener memberShipListener = new TestMemberShipListener(2);
h3.getCluster().addMembershipListener(memberShipListener);
TestLifeCycleListener lifeCycleListener = new TestLifeCycleListener(1);
h3.getLifecycleService().addLifecycleListener(lifeCycleListener);