expect(request.getOnload()).andStubReturn(onload);
expect(request.getContext()).andStubReturn(GadgetsHandlerApi.RenderingContext.CONTAINER);
replay();
GadgetsHandlerApi.JsResponse response = gadgetHandler.getJs(request);
JsUri expectedUri = new JsUri(null, false, false, CONTAINER, FakeProcessor.SPEC_URL.toString(),
features, null, onload, false, false, RenderingContext.CONTAINER, null, repository);
assertEquals(expectedUri, uriCapture.getValue());
assertNull(response.getJsUrl());
assertEquals(jsContent, response.getJsContent());
assertEquals(timeSource.currentTimeMillis() + HttpUtil.getDefaultTtl() * 1000, response