HttpRequest extends MessageImpl { public String getQueryParameter(String parameterName) { return query.getParameter(parameterName); } private  HttpRequest();  HttpRequest(HttpMethod method, String pathWithQuery);   HttpRequest(byte[] wireFormat); static HttpRequest readRequest(Connection connection); static String showRequest(HttpRequest r); HttpMethod getMethod(); String getPath(); String getHttpVersion(); String getQueryParameter(String parameterName); @Override String toString();  }
@Test public void getQueryParameter() throws Exception { HttpRequest r = new HttpRequest("GET /something/?a=b&c=d HTTP/1.1\n".getBytes()); assertEquals("b", r.getQueryParameter("a")); assertEquals("d", r.getQueryParameter("c")); assertEquals("/something/", r.getPath()); }