void () { TemplateManagerImpl.setTemplateTesting(myFixture.getTestRootDisposable()); myFixture.configureByText("a.java", """ class A { public String tes<caret>t() { } }"""); WriteCommandAction.runWriteCommandAction(myFixture.getProject(), () -> TemplateBuilderFactory .getInstance().createTemplateBuilder(myFixture.getElementAtCaret()).run(myFixture.getEditor(), true)); myFixture.checkResult(""" class A { <caret>public String test() { } }"""); }