void () { TemplateManagerImpl.setTemplateTesting(myFixture.getTestRootDisposable()); myFixture.addClass("package foo; public class Foo { public void someMethod() {} }"); myFixture.configureByText("a.java", "\nclass Test {\n void foo() { <caret>CONST.someMethod(); }\n}\n"); myFixture.launchAction(myFixture.findSingleIntention("Create constant field")); myFixture.checkResult(""" import foo.Foo; class Test { private static final <selection>Foo</selection> CONST = ; void foo() { CONST.someMethod(); } } """); assertNull(myFixture.getLookup()); }