public void testInsertDiffAttrsParStart() throws Exception {
insertOffset = paragraph.getEndOffset();
// doc.insertString(insertOffset, caps, italic);
content.insertString(insertOffset, caps);
event = doc.new DefaultDocumentEvent(insertOffset, capsLen, EventType.INSERT);
ElementSpec[] specs = { new ElementSpec(null, ElementSpec.EndTagType),
new ElementSpec(null, ElementSpec.StartTagType),
new ElementSpec(italic, ElementSpec.ContentType, capsLen), };
specs[1].setDirection(ElementSpec.JoinNextDirection);
buf.insert(insertOffset, capsLen, specs, event);
List<?> edits = getEdits(event);
assertEquals(2, edits.size());
assertChange(edits.get(0), new int[] { 15, 19 }, new int[] { 15, 16 });