specFactory.getGadgetSpec(createContext(SPEC_URL, true));
}
public void badFetchThrowsExceptionOverridingCache() throws Exception {
HttpRequest firstRequest = createCacheableRequest();
expect(pipeline.execute(firstRequest)).andReturn(new HttpResponse(LOCAL_SPEC_XML)).times(2);
HttpRequest secondRequest = createIgnoreCacheRequest();
expect(pipeline.execute(secondRequest)).andReturn(HttpResponse.error()).once();
replay(pipeline);
specFactory.getGadgetSpec(createContext(SPEC_URL, false));