public void testSuccess() throws Exception
{
ContentType ct = new ContentType("text/html");
PrintWriter pw = newPrintWriter();
WebResponse response = newWebResponse(ct, pw);
IMarkupWriter nested = newNestedWriter();
MockControl control = newControl(IMarkupWriter.class);
IMarkupWriter writer = (IMarkupWriter) control.getMock();
writer.getNestedWriter();
control.setReturnValue(nested);
MarkupWriterSource source = newSource(pw, ct, writer);
IPage page = newPage(ct);
IEngineService assetService = newAssetService();
IRequestCycle cycle = newCycle("ZePage", page);
cycle.renderPage(nested);
writer.comment("BEGIN Tapestry Portlet appId NAMESPACE");
writer.comment("Page: ZePage");
writer.comment("Generated:.*");
control.setMatcher(new RegexpMatcher());
writer.comment("Framework version:.*");
nested.close();
writer.comment("END Tapestry Portlet appId NAMESPACE");
writer.close();
replayControls();
PortletRendererImpl r = new PortletRendererImpl();
r.setMarkupWriterSource(source);