### Question:
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); @Override final void handle(HttpExchange httpExchange);  }### Answer:
@Test void parseEmptyQuery() throws URISyntaxException, UnsupportedEncodingException { URI uri = new URI("http: String queryString = ""; assertThat(ZPageHttpHandler.parseQueryString(uri.getRawQuery())).isEmpty(); assertThat(ZPageHttpHandler.parseQueryString(queryString)).isEmpty(); }
@Test void parseNormalQuery() throws URISyntaxException, UnsupportedEncodingException { URI uri = new URI("http: String queryString = "zspanname=Test&ztype=1&zsubtype=5&noval"; assertThat(ZPageHttpHandler.parseQueryString(uri.getRawQuery())) .containsOnly(entry("zspanname", "Test"), entry("ztype", "1"), entry("zsubtype", "5")); assertThat(ZPageHttpHandler.parseQueryString(queryString)) .containsOnly(entry("zspanname", "Test"), entry("ztype", "1"), entry("zsubtype", "5")); }