void () { JavaProjectCodeInsightSettings.setExcludedNames(getProject(), myFixture.getTestRootDisposable(), "foo.Outer.*1*"); myFixture.addClass(""" package foo; public class Outer { public static void method1() { } public static void method2() { } public static void method12() { } public static void method42() { } } """); myFixture.configureByText("a.java", "class C {{ foo.Outer.m<caret> }}"); myFixture.completeBasic(); assertEquals(myFixture.getLookupElementStrings(), List.of("method2", "method42")); }