@Test
public void makeAndProcessSymmetric() throws GadgetException {
// Make...
ContainerConfig config = mockConfig("http://www.js.org", "/gadgets/js");
List<String> extern = Lists.newArrayList("feature1", "feature2", "feature3");
JsUri ctx = mockGadgetContext(false, false, extern);
String version = "verstring";
Versioner versioner = mockVersioner(ctx, version, version);
TestDefaultJsUriManager manager = makeManager(config, versioner);
Uri jsUri = manager.makeExternJsUri(ctx);
assertFalse(manager.hadError());
assertEquals("http", jsUri.getScheme());
assertEquals("www.js.org", jsUri.getAuthority());
assertEquals("/gadgets/js/" + addJsLibs(extern) + JS_SUFFIX, jsUri.getPath());
assertEquals(CONTAINER, jsUri.getQueryParameter(Param.CONTAINER.getKey()));
assertEquals(version, jsUri.getQueryParameter(Param.VERSION.getKey()));
assertEquals("0", jsUri.getQueryParameter(Param.NO_CACHE.getKey()));
assertEquals("0", jsUri.getQueryParameter(Param.DEBUG.getKey()));
// ...and process
JsUri processed = manager.processExternJsUri(jsUri);
assertEquals(UriStatus.VALID_VERSIONED, processed.getStatus());
assertCollectionEquals(extern, processed.getLibs());
}