Bug 22467 TextEdits: replace != delete + insert
see TextBufferTest.testReplaceAndInsert1
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/TextBufferTest.java
}
	
	public void testReplaceAndInsert2() throws Exception {
		SimpleTextEdit e1= SimpleTextEdit.createDelete(0, 2);
		fEditor.add(e1);
		SimpleTextEdit e11= SimpleTextEdit.createInsert(0, "xx");
		fEditor.add(e11);		
		SimpleTextEdit e2= SimpleTextEdit.createInsert(0, "y");
		fEditor.add(e2);	
		assertTrue(fEditor.canPerformEdits());
		UndoMemento undo= fEditor.performEdits(null);
		assertEquals("Buffer content", "xxy23456789", fBuffer.getContent());
	}	
	
	private void doUndo(UndoMemento undo) throws Exception {
		fEditor.add(undo);
		fEditor.performEdits(null);
		assertBufferContent();
	}
	
	private void assert(TextRange r, int offset, int length) {
		assertEquals("Offset", offset, r.getOffset());
		assertEquals("Length", length, r.getLength());	
	}
	
	private void assertBufferContent() {
		assertEquals("Buffer content restored", "0123456789", fBuffer.getContent());
	}	
}