Widget w = new Widget();
w.setEntityId(1L);
w.setType(Constants.WIDGET_TYPE);
w.setUrl(VALID_GADGET_URL);
Region region = new Region(1L);
RegionWidget rw = new RegionWidget();
rw.setEntityId(1L);
rw.setCollapsed(VALID_COLLAPSED);
rw.setWidget(w);
rw.setRegion(region);
rw.setPreferences(Arrays.asList(new RegionWidgetPreference(1L, 1L, "color", "blue"),
new RegionWidgetPreference(2L, 1L, "speed", "fast"),
new RegionWidgetPreference(3L, 1L, null, null)));
final String markup =
"<script>rave.registerWidget(widgetsByRegionIdMap, 1, {type: 'OpenSocial'," +