@Test
  public void testOneListenerTwoNotifiers() throws Exception {
    helixNotifier.subscribe(refTopics.get(0), listeners.get(0));
    latch0.set(new CountDownLatch(1));
    HelixNotifier helixNotifier2 = new HelixNotifier(getMockHelixStore(storeConfig));
    helixNotifier2.publish(refTopics.get(0), refMessages.get(0));
    awaitLatchOrTimeout(latch0.get(), LATCH_TIMEOUT_MS);
    assertEquals(1, receivedTopicsByListener0.size());
    assertEquals(refTopics.get(0), receivedTopicsByListener0.get(0));
    assertEquals(1, receivedMessagesByListener0.size());
    assertEquals(refMessages.get(0), receivedMessagesByListener0.get(0));
  }
Tests a {@link TopicListener} subscribes a topic from one {@link HelixNotifier}, and receives a message sent
through another {@link HelixNotifier} for the same topic.
@throws Exception Any unexpected exceptions.
ambry-commons/src/test/java/com/github/ambry/commons/HelixNotifierTest.java