Query { public String getParameter(String parameterName) { return parameters.get(parameterName); } Query();  Query(String rawQuerySection); String getParameter(String parameterName); @Override String toString();  }
@Test public void emptyQuery() throws Exception { Query q = new Query(); assertNull(q.getParameter("something")); }
@Test public void query2() throws Exception { Query q = new Query("a=b&c=d"); assertNull(q.getParameter("something")); assertEquals("b", q.getParameter("a")); assertEquals("d", q.getParameter("c")); }