throws ExpressionCompileException, IOException {
//forName expects pageName to be in all-lower case (it's an optimization)
targetPageName = targetPageName.toLowerCase();
final PageBook pageBook = createMock(PageBook.class);
final PageBook.Page page = createMock(PageBook.Page.class);
final Respond respond = RespondersForTesting.newRespond();
final MvelEvaluator evaluator = new MvelEvaluator();
final WidgetChain widget = new ProceedingWidgetChain();
final WidgetChain targetWidgetChain = new ProceedingWidgetChain();
//noinspection unchecked
targetWidgetChain.addWidget(new XmlWidget(new ProceedingWidgetChain()
.addWidget(new IncludeWidget(new TerminalWidgetChain(), "'me'", evaluator)),
"p", new MvelEvaluatorCompiler(Object.class), new LinkedHashMap<String, String>() {{
put("class", "pretty");
put("id", "a-p-tag");
}}));
widget.addWidget(new ShowIfWidget(targetWidgetChain, "true", evaluator));
Renderable bodyWrapper = new XmlWidget(widget, "body", createMock(EvaluatorCompiler.class), Collections.<String, String>emptyMap());
expect(pageBook.forName(targetPageName))
.andReturn(page);
//mypage does?
final MyEmbeddedPage myEmbeddedPage = new MyEmbeddedPage();