void () { TemplateManagerImpl.setTemplateTesting(myFixture.getTestRootDisposable()); myFixture.configureByFile("BeforeTestData.java"); final TemplateManager manager = TemplateManager.getInstance(getProject()); final Template template = manager.createTemplate("myTemplate", "test", "template $VAR$ text"); template.addVariable("VAR", new EmptyNode(), true); TemplateManager.getInstance(myFixture.getProject()).startTemplate(myFixture.getEditor(), template); myFixture.type("myVariableValue"); }