String id = "1111L";
String id2 = "2222L";
String regionWidgetId1 = "9876L";
String regionWidgetId2 = "6543L";
String regionWidgetId3 = "2874L";
Page page = new PageImpl("1234L");
List<Page> pages = Lists.newArrayList();
List<Region> regions = Lists.newArrayList();
List<RegionWidget> regionWidgets = Lists.newArrayList();
Region region = new RegionImpl(id);
Region region2 = new RegionImpl(id2);
RegionWidget rw1 = new RegionWidgetImpl(regionWidgetId1);
RegionWidget rw2 = new RegionWidgetImpl(regionWidgetId2);
RegionWidget rw3 = new RegionWidgetImpl(regionWidgetId3);
regions.add(region);
regions.add(region2);
regionWidgets.add(rw1);
regionWidgets.add(rw2);
regionWidgets.add(rw3);
region.setRegionWidgets(regionWidgets);
pages.add(page);
page.setRegions(regions);
Query q = new Query();
expect(template.find(q)).andReturn(pages);
replay(template);