void () { myFixture.configureByText("a.java", "\nclass X {\n int test() {\n<selection> return 5;\n</selection> }\n}\n"); TemplateActionContext templateActionContext = TemplateActionContext.surrounding(getFile(), getEditor()); List<TemplateImpl> templates = TemplateManagerImpl.listApplicableTemplates(templateActionContext); String result = templates.stream() .map(Object::toString) .collect(Collectors.joining(", ")); assert result.equals("Java/C, Java/RL, Java/WL, Java/I"); }