void () { myFixture.addClass("package foo; public @interface Anno { String value(); }"); myFixture.configureByText("a.java", "import foo.*; <selection>@Anno(\"\")</selection> class T {}"); assert SaveAsTemplateAction.suggestTemplateText(myFixture.getEditor(), myFixture.getFile(), myFixture.getProject()) .equals("@foo.Anno(\"\")"); myFixture.configureByText("b.java", "import foo.*; <selection>@Anno(value=\"\")</selection> class T {}"); assert SaveAsTemplateAction.suggestTemplateText(myFixture.getEditor(), myFixture.getFile(), myFixture.getProject()) .equals("@foo.Anno(value=\"\")"); }