public void testElementStartAddsStyles() throws PAPIException {
SpanAttributes attrsAttributes =
(SpanAttributes) createTestableAttrsAttributes();
attrsAttributes.setSrc("{expression.ext}");
TestableSpanElementImpl element = (TestableSpanElementImpl)
createTestablePAPIElement();
final TextAssetReferenceMock textAssetReferenceMock =
new TextAssetReferenceMock("textAssetReferenceMock",
expectations);
referenceResolverMock.expects
.resolveQuotedTextExpression("{expression.ext}")
.returns(textAssetReferenceMock).any();
textAssetReferenceMock.expects.isPolicy().returns(false).any();
com.volantis.mcs.protocols.SpanAttributes protocolAttributes =
new com.volantis.mcs.protocols.SpanAttributes();
element.setVolantisAttributes(protocolAttributes);
element.elementStart(requestContext, attrsAttributes);
// ensure that there is a CSP Container in the protocol attributes
Styles styles = protocolAttributes.getStyles();
assertNotNull("The protocol attributes should have a Styles after" +
"elementStart has been called", styles);