### Question:
UriInfoImpl implements UriInfo { public MultivaluedMap<String, String> getPathParameters() { return getPathParameters(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 testGetTemplateParameters() { MultivaluedMap<String, String> values = new MetadataMap<>(); new URITemplate("/bar").match("/baz", values); UriInfoImpl u = new UriInfoImpl(mockMessage("http: values); assertEquals("unexpected templates", 0, u.getPathParameters().size()); values.clear(); new URITemplate("/{id}").match("/bar%201", values); u = new UriInfoImpl(mockMessage("http: values); MultivaluedMap<String, String> tps = u.getPathParameters(false); assertEquals("Number of templates is wrong", 1, tps.size()); assertEquals("Wrong template value", tps.getFirst("id"), "bar%201"); values.clear(); new URITemplate("/{id}/{baz}").match("/1%202/bar", values); u = new UriInfoImpl(mockMessage("http: values); tps = u.getPathParameters(); assertEquals("Number of templates is wrong", 2, tps.size()); assertEquals("Wrong template value", tps.getFirst("id"), "1 2"); assertEquals("Wrong template value", tps.getFirst("baz"), "bar"); values.clear(); new URITemplate("/bar").match("/bar", values); u = new UriInfoImpl(mockMessage("http: values); assertEquals("unexpected templates", 0, u.getPathParameters().size()); }