notificationListener2.subscribe(randomChannelName);
Thread.sleep(1500); // Let them settle
notificationListener1.announce(randomChannelName, "Message from 1");
notificationListener2.announce(randomChannelName, "Message from 2");
for (int i = 0; i < 100; i++) {
Thread.sleep(100); // Wait for messages
if (messagesReceivedBy1.get() == 2 && messagesReceivedBy2.get() == 2) {
break;