public void testTranslateHTMLToCSSA() throws Exception {
doc.remove(0, doc.getLength());
HTMLEditorKit kit = new HTMLEditorKit();
kit.read(new StringReader("<a href=\"http://go\">link</a>"), doc, 0);
AbstractElement body =
(AbstractElement)doc.getDefaultRootElement().getElement(1);
assertEquals("body", body.getName());
body.addAttribute(HTML.Attribute.BGCOLOR, "#ffffff");
body.addAttribute(HTML.Attribute.BACKGROUND, "bg.jpg");
body.addAttribute(HTML.Attribute.TEXT, "black");
body.addAttribute(HTML.Attribute.LINK, "blue");
body.addAttribute(HTML.Attribute.ALINK, "red");
body.addAttribute(HTML.Attribute.VLINK, "purple");
AbstractElement a = (AbstractElement)doc.getCharacterElement(2);
assertNotNull(a.getAttribute(HTML.Tag.A));
attr = ss.translateHTMLToCSS(a);
assertNull(((NamedStyle)attr).getName());
assertEquals(0, attr.getAttributeCount());
}