void () { myFixture.configureByText(XmlFileType.INSTANCE, "<di<caret>></di>"); type("v"); Ref<Boolean> eventSent = Ref.create(false); myFixture.getEditor().getDocument().addDocumentListener(new DocumentListener() { @Override public void documentChanged(@NotNull DocumentEvent e) { eventSent.set(true); } }, myFixture.getTestRootDisposable()); myFixture.testAction(new MoveCaretLeftAction()); assertFalse(eventSent.get()); }