chain.addWidget(new HeaderWidget(new TerminalWidgetChain(),
Maps.<String, String>newHashMap(), compiler));
List<Node> nodes = HtmlParser.parse("<html>" + requireString + "</html>");
Node node = nodes.get(0).childNode(0);
WidgetChain inner = Chains.terminal();
if (!node.childNodes().isEmpty())
inner = Chains.singleton(new TextWidget(node.childNode(0).toString(), compiler));
chain.addWidget(new RequireWidget(new XmlWidget(inner, node.nodeName(), compiler,
HtmlTemplateCompiler.parseAttribs(node.attributes()))));
chain.addWidget(new RequireWidget(new XmlWidget(inner, node.nodeName(), compiler,
HtmlTemplateCompiler.parseAttribs(node.attributes()))));
chain.addWidget(new RequireWidget(new XmlWidget(inner, node.nodeName(), compiler,
HtmlTemplateCompiler.parseAttribs(node.attributes()))));
//render
chain.render(new Object(), respond);
final String expected = "<head>" + requireString + "</head>";