expect(page.getPageName()).andReturn("RequestPage").anyTimes();
expect(cycle.getParameter(ServiceConstants.PAGE)).andReturn("anotherPage").anyTimes();
expect(writer.getNestedWriter()).andReturn(nwriter);
nwriter.begin("response");
nwriter.attribute("type", ResponseBuilder.PAGE_TYPE);
expect(pageService.getLink(true, "RequestPage")).andReturn(link);
expect(link.getAbsoluteURL()).andReturn("/new/url");
nwriter.attribute("url", "/new/url");