public void noTestElementStartAddsStyles() throws Exception {
// configure MCS
final MarinerRequestContext requestContext =
new TestMarinerRequestContext();
ProtocolBuilder builder = new ProtocolBuilder();
DOMProtocol protocol = (DOMProtocol) builder.build(
new TestProtocolRegistry.TestDOMProtocolFactory(), null);
final TestMarinerPageContext pageContext = new TestMarinerPageContext();
pageContext.pushRequestContext(requestContext);
pageContext.setProtocol(protocol);
pageContext.setPageGenerationCache(new PageGenerationCache());
pageContext.setRequestURL(
new MarinerURL("http://server:8080/volantis/test.xdime"));
final PolicyReferenceResolverMock referenceResolverMock =
new PolicyReferenceResolverMock("referenceResolverMock",
expectations);
pageContext.setPolicyReferenceResolver(referenceResolverMock);
referenceResolverMock.expects
.resolveQuotedLinkExpression(null, PageURLType.FORM)
.returns(null).any();
referenceResolverMock.expects.resolveQuotedTextExpression(null)
.returns(null).any();
referenceResolverMock.expects
.resolveQuotedTextExpression("testCaption")
.returns(new LiteralTextAssetReference("testCaption"))
.any();
ContextInternals.setMarinerPageContext(requestContext, pageContext);
protocol.setMarinerPageContext(pageContext);
loadStyleSheet(pageContext);
// a form with a pane in it
final CanvasLayout canvasLayout =