@Override
  public String getHeader(String headerName) {
    String headerValue = null;
    try {
      if (responseMetadata.has(RESPONSE_HEADERS_KEY) && responseMetadata.getJSONObject(RESPONSE_HEADERS_KEY)
          .has(headerName)) {
        headerValue = responseMetadata.getJSONObject(RESPONSE_HEADERS_KEY).get(headerName).toString();
      }
    } catch (JSONException e) {
      throw new IllegalStateException(e);
    }
    return headerValue;
  }
Called when an event (function call) finishes successfully in MockRestResponseChannel. Does *not* trigger if the
event (function) fails.
@param mockRestResponseChannel the {@link MockRestResponseChannel} where the event occurred.
@param event the {@link Event} that occurred.
ambry-test-utils/src/main/java/com/github/ambry/rest/MockRestResponseChannel.java