### Question:
ChangedUriInfo implements UriInfo { @Override public String getPath() { String uriPath = this.uri.getPath(); if (uriPath != null) { String removeString = "/rest/"; if (uriPath.startsWith(removeString)) { return uriPath.substring(removeString.length()); } return uriPath; } return null; } ChangedUriInfo(String uri, UriInfo uriInfo); String getOriginalUri(); @Override String getPath(); @Override String getPath(boolean decode); @Override List<PathSegment> getPathSegments(); @Override List<PathSegment> getPathSegments(boolean decode); @Override URI getRequestUri(); @Override UriBuilder getRequestUriBuilder(); @Override URI getAbsolutePath(); @Override UriBuilder getAbsolutePathBuilder(); @Override URI getBaseUri(); @Override UriBuilder getBaseUriBuilder(); @Override MultivaluedMap<String, String> getPathParameters(); @Override MultivaluedMap<String, String> getPathParameters(boolean decode); @Override MultivaluedMap<String, String> getQueryParameters(); @Override MultivaluedMap<String, String> getQueryParameters(boolean decode); @Override List<String> getMatchedURIs(); @Override List<String> getMatchedURIs(boolean decode); @Override List<Object> getMatchedResources(); static final String ORIGINAL_REQUEST_KEY; }### Answer:
@Test public void testGetPath() { assertTrue(new ChangedUriInfo("/rest/foo/bar", null).getPath().equals("foo/bar")); }