void () { myFixture.configureByText("dummy.java", """ package templates; public class Foo { void m(boolean b, int value) { b.<caret> value = 123; } }"""); LookupElement[] elements = myFixture.completeBasic(); List<String> actual = ContainerUtil.map(elements, element -> element.getLookupString()); assertDoesntContain(actual, ".hello"); //add extension MyPostfixTemplateProvider templateProvider = new MyPostfixTemplateProvider(); LanguagePostfixTemplate.LANG_EP.addExplicitExtension(JavaLanguage.INSTANCE, templateProvider); elements = myFixture.completeBasic(); actual = ContainerUtil.map(elements, element -> element.getLookupString()); assertContainsElements(actual, ".hello"); //remove extension LanguagePostfixTemplate.LANG_EP.removeExplicitExtension(JavaLanguage.INSTANCE, templateProvider); elements = myFixture.completeBasic(); actual = ContainerUtil.map(elements, element -> element.getLookupString()); assertDoesntContain(actual, ".hello"); }