DocumentEvent.EventType.CHANGE);
assertTrue(edit.addEdit(insert));
assertTrue(edit.addEdit(remove));
assertEquals(2, getEdits(edit).size());
// Stop collecting and make undo
edit.end();
edit.undo();
// The document should be in its intial state
assertEquals("", doc.getText(0, doc.getLength()));
}