public MockRestResponseChannel addListener(EventListener listener) {
    if (listener != null) {
      synchronized (listeners) {
        listeners.add(listener);
      }
    }
    return this;
  }
Register to be notified about events that occur in this MockRestResponseChannel.
@param listener the listener that needs to be notified of events.
ambry-test-utils/src/main/java/com/github/ambry/rest/MockRestResponseChannel.java