void () { myFixture.configureByText("a.java", "\n\nclass Foo {\n {\n <caret>\n }\n}\n\nclass Bar1 extends Foo {}\nclass Bar2 extends Foo {}\n"); Template template = getTemplateManager().createTemplate("xxx", "user", "$T$ var = new $ST$();"); template.addVariable("T", new EmptyNode(), true); template.addVariable("ST", "subtypes(T)", "", true); startTemplate(template); myFixture.type("Foo"); getState().nextTab(); assert myFixture.getEditor().getDocument().getText().contains("Foo var = new Foo();"); UsefulTestCase.assertSameElements(myFixture.getLookupElementStrings(), "Foo", "Bar1", "Bar2"); }