style.addAttribute(StyleConstants.Subscript, Boolean.TRUE);
StyledDocument newDoc = new DefaultStyledDocument();
Style newStyle = newDoc.getStyle(StyleContext.DEFAULT_STYLE);
assertNull(newStyle.getAttribute(StyleConstants.FontSize));
assertNull(newStyle.getAttribute(StyleConstants.FontFamily));
newStyle.addAttribute(StyleConstants.FontFamily, "family2");
newStyle.addAttribute(StyleConstants.FontSize, new Integer(10));
newStyle.addAttribute(StyleConstants.Italic, Boolean.FALSE);
newStyle.addAttribute(StyleConstants.StrikeThrough, Boolean.TRUE);
newStyle.addAttribute(StyleConstants.Subscript, Boolean.FALSE);
newStyle.addAttribute(StyleConstants.Foreground, Color.RED);