void () { JavaProjectCodeInsightSettings.setExcludedNames(getProject(), myFixture.getTestRootDisposable(), "foo"); myFixture.addClass("package foo; public class Outer { public class Inner {} }"); myFixture.addClass("package bar; public class Inner {}"); configure(); assertEquals("foo.Outer.Inner", ((JavaPsiClassReferenceElement)myFixture.getLookupElements()[0]).getQualifiedName()); assertEquals(myFixture.getLookupElementStrings(), List.of("Inner")); }