}
protected void dotestEnterAutoEdit(String textBefore, String textAfter, String expectedInsert, int offsetDelta) {
Document document = setupDocument(textBefore, textAfter);
int keypressOffset = textBefore.length();
DocumentCommand docCommand = createDocumentCommand(keypressOffset, 0, NL);
getAutoEditStrategy().customizeDocumentCommand(document, docCommand);
int caretOffset = (offsetDelta == -1) ? -1 : textBefore.length() + offsetDelta;
int replaceLength = 0;
checkCommand(docCommand, expectedInsert, keypressOffset, replaceLength, caretOffset);
}