EasyMock.replay(containerConfig);
}
@Test
public void testSocialPreload() throws Exception {
GadgetSpec spec = new GadgetSpec(GADGET_URL, XML);
String socialResult = "[{id:'p', data:1}, {id:'a', data:2}]";
RecordingRequestPipeline pipeline = new RecordingRequestPipeline(socialResult);
PipelinedDataPreloader preloader = new PipelinedDataPreloader(pipeline, containerConfig);
view = "profile";
contextParams.put("st", "token");
Gadget gadget = new Gadget()
.setContext(context)
.setSpec(spec)
.setCurrentView(spec.getView("profile"));
PipelinedData.Batch batch = getBatch(gadget);
Collection<Callable<PreloadedData>> tasks = preloader.createPreloadTasks(
context, batch);
assertEquals(1, tasks.size());