public void testAddMembershipListener_whenListenerRegisteredTwice() {
TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(2);
HazelcastInstance hz1 = factory.newHazelcastInstance();
Cluster cluster = hz1.getCluster();
final MembershipListener membershipListener = mock(MembershipListener.class);
String id1 = cluster.addMembershipListener(membershipListener);
String id2 = cluster.addMembershipListener(membershipListener);
// first we check if the registration id's are different