@Test
  public void publishMessageToTopicWithNoListeners() throws Exception {
    latch0.set(new CountDownLatch(1));
    helixNotifier.publish(refTopics.get(0), refMessages.get(0));
    try {
      awaitLatchOrTimeout(latch0.get(), 1);
      fail("should have thrown");
    } catch (TimeoutException e) {
      // expected, since the TopicListener would not be called, and the latch would not be counted down.
    }
  }
Tests publishing a message to a topic without any {@link TopicListener}. This test is meaningful
when using {@link MockHelixPropertyStore}, where a single thread guarantees to know if
{@link TopicListener#onMessage(String, Object)} has been called or not.
@throws Exception Any unexpected exception.
ambry-commons/src/test/java/com/github/ambry/commons/HelixNotifierTest.java