content = new StringContent();
content.insertString(0, "012345^11111");
content.getChars(0, content.length(), text);
assertEquals(13, text.count);
assertEquals(20, text.array.length);
UndoableEdit undoable = content.remove(2, 0);
content.getChars(0, content.length(), text);
assertEquals(13, text.count);
assertEquals(20, text.array.length);
assertNotNull(undoable);
assertEquals("012345^11111\n", content.getString(0, content.length()));
undoable = content.remove(2, 5);
content.getChars(0, content.length(), text);
assertEquals(8, text.count);
assertEquals(20, text.array.length);
assertNotNull(undoable);
assertEquals("0111111\n", content.getString(0, content.length()));
undoable.undo();
assertEquals("012345^11111\n", content.getString(0, content.length()));
undoable.redo();
assertEquals("0111111\n", content.getString(0, content.length()));
}