private void resetListeners() throws Exception {
    listeners.clear();
    listeners.add(new ListenerForTest(latch0, receivedTopicsByListener0, receivedMessagesByListener0));
    listeners.add(new ListenerForTest(latch1, receivedTopicsByListener1, receivedMessagesByListener1));
    receivedTopicsByListener0.clear();
    receivedTopicsByListener1.clear();
    receivedMessagesByListener0.clear();
    receivedMessagesByListener1.clear();
    latch0.set(null);
    latch1.set(null);
  }
Resets {@code listeners} and {@link AtomicReference}s that are used to record results for {@link TopicListener}s.
@throws Exception Any unexpected exceptions.
ambry-commons/src/test/java/com/github/ambry/commons/HelixNotifierTest.java