### Question:
DefaultAccelUriManager implements AccelUriManager { public Uri parseAndNormalize(HttpRequest httpRequest) throws GadgetException { Gadget gadget = DomWalker.makeGadget(httpRequest); ProxyUriManager.ProxyUri proxied = looksLikeAccelUri(httpRequest.getUri()) ? proxyUriManager.process(httpRequest.getUri()) : new ProxyUriManager.ProxyUri( gadget, httpRequest.getUri()); return proxyUriManager.make(ImmutableList.of(proxied), 0).get(0); } @Inject  DefaultAccelUriManager(ContainerConfig config,
                                ProxyUriManager proxyUriManager); Uri parseAndNormalize(HttpRequest httpRequest);  }### Answer:
@Test public void testParseAndNormalizeNonAccelUri() throws Exception { Uri uri = Uri.parse("http: HttpRequest req = new HttpRequest(uri); assertEquals(Uri.parse(" + "&gadget=http%3A%2F%2Fwww.example.org%2Findex.html" + "&debug=0&nocache=0&refresh=0" + "&url=http%3A%2F%2Fwww.example.org%2Findex.html"), uriManager.parseAndNormalize(req)); uri = Uri.parse("http: req = new HttpRequest(uri); req.setContainer("accel"); assertEquals(Uri.parse(" + "&gadget=http%3A%2F%2Fwww.example.org%2Findex.html" + "&debug=0&nocache=0&refresh=0" + "&url=http%3A%2F%2Fwww.example.org%2Findex.html"), uriManager.parseAndNormalize(req)); }
@Test public void testParseAndNormalizeAccelUri() throws Exception { Uri uri = Uri.parse("http: + "&gadget=http%3A%2F%2Fwww.1.com%2Fa.html" + "&url=http%3A%2F%2Fwww.example.org%2Findex.html"); HttpRequest req = new HttpRequest(uri); assertEquals(Uri.parse(" + "&gadget=http%3A%2F%2Fwww.1.com%2Fa.html" + "&debug=0&nocache=0&refresh=0" + "&url=http%3A%2F%2Fwww.example.org%2Findex.html"), uriManager.parseAndNormalize(req)); }