void () { myFixture.configureByText("a.java", "\nclass Foo {\n <caret>\n void foo() {}\n}\n"); Template template = getTemplateManager().createTemplate("result", "user", "@SuppressWarnings(\"$T$\")"); template.addVariable("T", new MacroCallNode(new MethodNameMacro()), new EmptyNode(), false); template.setToReformat(true); startTemplate(template); assert myFixture.getEditor().getDocument().getText().contains("@SuppressWarnings(\"foo\")"); }