### Question:
ProxyUriUtils { public static String getPathAndQuery(ApplicationId id, String path, String query, boolean approved) { StringBuilder newp = new StringBuilder(); newp.append(getPath(id, path)); boolean first = appendQuery(newp, query, true); if(approved) { appendQuery(newp, PROXY_APPROVAL_PARAM+"=true", first); } return newp.toString(); }  static String getPath(ApplicationId id); static String getPath(ApplicationId id, String path); static String getPathAndQuery(ApplicationId id, String path, 
      String query, boolean approved); static URI getProxyUri(URI originalUri, URI proxyUri,
      ApplicationId id); static URI getUriFromAMUrl(String noSchemeUrl); static URI getUriFromTrackingPlugins(ApplicationId id,
      List<TrackingUriPlugin> trackingUriPlugins); static final String PROXY_SERVLET_NAME; static final String PROXY_BASE; static final String PROXY_PATH_SPEC; static final String PROXY_APPROVAL_PARAM; }### Answer:
@Test public void testGetPathAndQuery() { assertEquals("/proxy/application_6384623_0005/static/app?foo=bar", ProxyUriUtils.getPathAndQuery(BuilderUtils.newApplicationId(6384623l, 5), "/static/app", "?foo=bar", false)); assertEquals("/proxy/application_6384623_0005/static/app?foo=bar&bad=good&proxyapproved=true", ProxyUriUtils.getPathAndQuery(BuilderUtils.newApplicationId(6384623l, 5), "/static/app", "foo=bar&bad=good", true)); }