assertThat(pageConverter.convert(page), is(nullValue()));
}
@Test
public void newPage() {
Page page = new PageImpl();
page.setId("1");
page.setMembers(new ArrayList<PageUser>());
page.setName("name");
page.setOwnerId("");
page.setPageLayout(new PageLayoutImpl());
page.setPageType(PageType.USER);
page.setParentPage(new PageImpl("1"));
page.setRegions(new ArrayList<Region>());
page.setSubPages(new ArrayList<Page>());
JpaPage converted = pageConverter.convert(page);
assertThat(converted, is(not(sameInstance(page))));
assertThat(converted, is(instanceOf(JpaPage.class)));
assertThat(converted.getId(), is(equalTo(page.getId())));
assertThat(converted.getParentPage().getId(), is(equalTo(page.getParentPage().getId())));
assertThat(converted.getRegions(), is(equalTo(page.getRegions())));
assertThat(converted.getMembers(), is(equalTo(page.getMembers())));
assertThat(converted.getName(), is(equalTo(page.getName())));
assertThat(converted.getOwnerId(), is(equalTo(page.getOwnerId())));
assertThat(converted.getPageLayout().getCode(), is(equalTo(page.getPageLayout().getCode())));
assertThat(converted.getPageType(), is(equalTo(page.getPageType())));
assertThat(converted.getSubPages(), is(equalTo(page.getSubPages())));
}