void () { // TEMPLATE_STARTED_TOPIC event should not fire for preview editor getProject().getMessageBus().connect(getTestRootDisposable()) .subscribe(TemplateManager.TEMPLATE_STARTED_TOPIC, state -> fail()); myFixture.configureByText("Test.java", """ class Computer { void f() { int i; int j = <caret>i; } }"""); IntentionAction action = myFixture.findSingleIntention("Initialize variable 'i'"); assertPreviewText(action, """ class Computer { void f() { int i = 0; int j = i; } }"""); }