assertThat(returned, is(sameInstance(p)));
}
@Test
public void getPage_validId_export() {
Page p = new PageImpl();
p.setRegions(new ArrayList<Region>());
p.setOwnerId("");
Region region = new RegionImpl();
region.setRegionWidgets(new ArrayList<RegionWidget>());
RegionWidget w = new RegionWidgetImpl();
w.setPreferences(new ArrayList<RegionWidgetPreference>());
w.getPreferences().add(new RegionWidgetPreferenceImpl());
region.getRegionWidgets().add(w);
p.getRegions().add(region);
expect(pageService.getPage(PAGE_ID)).andReturn(p).once();
replay(pageService);
Page returned = pageApi.getPage(PAGE_ID, true);
assertThat(returned, is(sameInstance(p)));
assertThat(returned.getOwnerId(), is(nullValue()));
assertThat(returned.getRegions().get(0).getRegionWidgets().get(0).getPreferences(), is(nullValue()));
}