### Question:
UriInfoImpl implements UriInfo { public String getPath() { return getPath(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 testGetPath() { UriInfoImpl u = new UriInfoImpl(mockMessage("http: "/baz"), null); assertEquals("Wrong path", "baz", u.getPath()); u = new UriInfoImpl(mockMessage("http: "/bar/baz"), null); assertEquals("Wrong path", "/", u.getPath()); u = new UriInfoImpl(mockMessage("http: "/bar/baz/"), null); assertEquals("Wrong path", "/", u.getPath()); u = new UriInfoImpl(mockMessage("http: null); assertEquals("Wrong path", "bar 1", u.getPath()); u = new UriInfoImpl(mockMessage("http: null); assertEquals("Wrong path", "bar%201", u.getPath(false)); }