EasyMock.expect(jsPipeline.execute(EasyMock.isA(JsRequest.class))).andReturn(
new JsResponseBuilder().appendJs(jsContent, "js").build());
replay();
RpcHandler operation = registry.getRpcHandler(request);
Object responseObj = operation.execute(emptyFormItems, authContext, converter).get();
JSONObject results = new JSONObject(converter.convertToString(responseObj));
assertEquals(jsUri.toString(), results.getString("jsUrl"));
JsUri expectedUri = new JsUri(123, true, true, CONTAINER, GADGET1_URL, features,
loadedFeatures, onload, false, false, RenderingContext.CONTAINER, null, repository);
assertEquals(expectedUri, captureUri.getValue());