class ZPageHttpHandler implements HttpHandler {

  @VisibleForTesting
  static ImmutableMap<String, String> parseQueryString(String queryString)
      throws UnsupportedEncodingException {
    if (queryString == null) {
      return ImmutableMap.of();
    }
    Map<String, String> queryMap = new HashMap<String, String>();
    for (String param : QUERY_SPLITTER.split(queryString)) {
      List<String> keyValuePair = QUERY_KEYVAL_SPLITTER.splitToList(param);
      if (keyValuePair.size() > 1) {
        if (keyValuePair.get(0).equals(PARAM_SPAN_NAME)) {
          queryMap.put(keyValuePair.get(0), URLDecoder.decode(keyValuePair.get(1), "UTF-8"));
        } else {
          queryMap.put(keyValuePair.get(0), keyValuePair.get(1));
        }
      }
    }
    return ImmutableMap.copyOf(queryMap);
  }

    ZPageHttpHandler(ZPageHandler zpageHandler);

}