// This call causes all the garbage collected positions to be
// removed from the internal list
UndoableEdit ue = content.remove(0, 5);
assertEquals("5678", content.getString(0, content.length() - 1));
// Test (it shouldn't fail with any NullPointerException)
ue.undo();
assertEquals("012345678", content.getString(0, content.length() - 1));
}
}