### Question:
ProxyUriUtils { public static URI getProxyUri(URI originalUri, URI proxyUri, ApplicationId id) { try { String path = getPath(id, originalUri == null ? "/" : originalUri.getPath()); return new URI(proxyUri.getScheme(), proxyUri.getAuthority(), path, originalUri == null ? null : originalUri.getQuery(), originalUri == null ? null : originalUri.getFragment()); } catch (URISyntaxException e) { throw new RuntimeException("Could not proxify "+originalUri,e); } }  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 testGetProxyUri() throws Exception { URI originalUri = new URI("http: URI proxyUri = new URI("http: ApplicationId id = BuilderUtils.newApplicationId(6384623l, 5); URI expected = new URI("http: URI result = ProxyUriUtils.getProxyUri(originalUri, proxyUri, id); assertEquals(expected, result); }
@Test public void testGetProxyUriNull() throws Exception { URI originalUri = null; URI proxyUri = new URI("http: ApplicationId id = BuilderUtils.newApplicationId(6384623l, 5); URI expected = new URI("http: URI result = ProxyUriUtils.getProxyUri(originalUri, proxyUri, id); assertEquals(expected, result); }