@Test
public void addNewDefaultUserPage() {
final Long EXPECTED_RENDER_SEQUENCE = 1L;
PageTemplate pageTemplate = new PageTemplateImpl();
Page expectedPage = new PageImpl();
expectedPage.setName(defaultPageName);
expectedPage.setOwnerId(user.getId());
expectedPage.setPageLayout(pageLayout);
expectedPage.setRegions(createEmptyRegionList(pageLayout.getNumberOfRegions()));
PageUser lPageUser = new PageUserImpl(user.getId(), expectedPage, EXPECTED_RENDER_SEQUENCE);
List<PageUser> members = new ArrayList<PageUser>();
members.add(lPageUser);
expectedPage.setMembers(members);
expect(userService.getUserById(user.getId())).andReturn(user);
expect(pageLayoutRepository.getByPageLayoutCode(PAGE_LAYOUT_CODE)).andReturn(pageLayout);
expect(pageTemplateRepository.getDefaultPage(PageType.USER)).andReturn(pageTemplate);
expect(pageRepository.createPageForUser(user, pageTemplate)).andReturn(expectedPage);