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);
textPane.setDocument(newDoc);
assertNotSame(style, newStyle);
assertEquals(25, ((Integer) newStyle.getAttribute(StyleConstants.FontSize)).intValue());
assertEquals(font.getName(), newStyle.getAttribute(StyleConstants.FontFamily));
assertEquals(Boolean.TRUE, newStyle.getAttribute(StyleConstants.Italic));