assertEquals(UNCOMPRESSED_FILE_JS, lib.getDebugContent());
}
public void testUrl() throws Exception {
HttpFetcher mockFetcher = mock(HttpFetcher.class);
Uri location = Uri.parse("http://example.org/file.js");
HttpRequest request = new HttpRequest(location);
HttpResponse response = new HttpResponseBuilder()
.setResponse(URL_JS.getBytes())
.create();
expect(mockFetcher.fetch(eq(request))).andReturn(response);
replay();
JsLibrary lib = JsLibrary.create(
JsLibrary.Type.URL, location.toString(), null, mockFetcher);
verify();
// No type test here because it could potentially change.
assertEquals(URL_JS, lib.getContent());
assertEquals(URL_JS, lib.getDebugContent());