buffer.initialise();
final ProtocolConfigurationImpl protocolConfiguration =
(ProtocolConfigurationImpl) protocol.getProtocolConfiguration();
protocolConfiguration.setCSSMedia("handheld");
final StyleAttributes styleAttributes = new StyleAttributes();
protocol.openStyle(buffer, styleAttributes);
final Element head = (Element) buffer.getRoot().getHead();
assertEquals("handheld", head.getAttributeValue("media"));
assertEquals("text/css", head.getAttributeValue("type"));
buffer.appendEncoded(".c {color:red}");