### Question:
UriInfoImpl implements UriInfo { public MultivaluedMap<String, String> getQueryParameters() { return getQueryParameters(true); } @SuppressWarnings("unchecked")  UriInfoImpl(Message m);  UriInfoImpl(Message m, MultivaluedMap<String, String> templateParams); URI getAbsolutePath(); UriBuilder getAbsolutePathBuilder(); URI getBaseUri(); UriBuilder getBaseUriBuilder(); String getPath(); String getPath(boolean decode); List<PathSegment> getPathSegments(); List<PathSegment> getPathSegments(boolean decode); MultivaluedMap<String, String> getQueryParameters(); MultivaluedMap<String, String> getQueryParameters(boolean decode); URI getRequestUri(); UriBuilder getRequestUriBuilder(); MultivaluedMap<String, String> getPathParameters(); MultivaluedMap<String, String> getPathParameters(boolean decode); List<Object> getMatchedResources(); List<String> getMatchedURIs(); List<String> getMatchedURIs(boolean decode); @Override URI relativize(URI uri); @Override URI resolve(URI uri);  }### Answer:
@Test public void testGetQueryParameters() { UriInfoImpl u = new UriInfoImpl(mockMessage("http: null); assertEquals("unexpected queries", 0, u.getQueryParameters().size()); u = new UriInfoImpl(mockMessage("http: null); MultivaluedMap<String, String> qps = u.getQueryParameters(false); assertEquals("Number of queries is wrong", 1, qps.size()); assertEquals("Wrong query value", qps.getFirst("n"), "1%202"); u = new UriInfoImpl(mockMessage("http: "N=0&n=1%202&n=3&b=2&a%2Eb=ab"), null); qps = u.getQueryParameters(); assertEquals("Number of queiries is wrong", 4, qps.size()); assertEquals("Wrong query value", qps.get("N").get(0), "0"); assertEquals("Wrong query value", qps.get("n").get(0), "1 2"); assertEquals("Wrong query value", qps.get("n").get(1), "3"); assertEquals("Wrong query value", qps.get("b").get(0), "2"); assertEquals("Wrong query value", qps.get("a.b").get(0), "ab"); Message m = mockMessage("http: "N=0&n=1%202&n=3&&b=2&a%2Eb=ab"); m.put("parse.query.value.as.collection", Boolean.TRUE); u = new UriInfoImpl(m, null); qps = u.getQueryParameters(); assertEquals("Number of queries is wrong", 4, qps.size()); assertEquals("Wrong query value", qps.get("N").get(0), "0"); assertEquals("Wrong query value", qps.get("n").get(0), "1 2"); assertEquals("Wrong query value", qps.get("n").get(1), "3"); assertEquals("Wrong query value", qps.get("b").get(0), "2"); assertEquals("Wrong query value", qps.get("a.b").get(0), "ab"); }
@Test public void testGetCaseinsensitiveQueryParameters() { UriInfoImpl u = new UriInfoImpl(mockMessage("http: null); assertEquals("unexpected queries", 0, u.getQueryParameters().size()); Message m = mockMessage("http: "N=1%202&n=3&b=2&a%2Eb=ab"); m.put("org.apache.cxf.http.case_insensitive_queries", "true"); u = new UriInfoImpl(m, null); MultivaluedMap<String, String> qps = u.getQueryParameters(); assertEquals("Number of queiries is wrong", 3, qps.size()); assertEquals("Wrong query value", qps.get("n").get(0), "1 2"); assertEquals("Wrong query value", qps.get("n").get(1), "3"); assertEquals("Wrong query value", qps.get("b").get(0), "2"); assertEquals("Wrong query value", qps.get("a.b").get(0), "ab"); }