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}");
protocol.closeStyle(buffer, styleAttributes);
final Comment comment = (Comment) head.getHead();
assertEquals(".c {color:red}",
new String(comment.getContents(), 0, comment.getLength()));
}