public void loadUriInlineFetcherFailure() throws Exception {
Uri uri = Uri.parse("http://apache.org/resource.js");
Map<String, String> attribs = Maps.newHashMap();
attribs.put("inline", "true");
HttpFetcher fetcher = createMock(HttpFetcher.class);
expect(fetcher.fetch(eq(new HttpRequest(uri))))
.andThrow(new GadgetException(GadgetException.Code.FAILED_TO_RETRIEVE_CONTENT));
replay(fetcher);
loader.setHttpFetcher(fetcher);
FeatureResource resource = loader.load(uri, attribs);
assertNull(resource.getContent());