void () { myFixture.addClass("public interface Baaaaaaar {}"); myFixture.addClass("package boo; public interface Baaaaaaar {}"); myFixture.addClass("package zoo; public interface Baaaaaaar {}"); configureSecondCompletion(); TestCase.assertEquals("Baaaaaaar", ((JavaPsiClassReferenceElement)getLookup().getItems().get(0)).getQualifiedName()); TestCase.assertEquals("boo.Baaaaaaar", ((JavaPsiClassReferenceElement)getLookup().getItems().get(1)).getQualifiedName()); TestCase.assertEquals("zoo.Baaaaaaar", ((JavaPsiClassReferenceElement)getLookup().getItems().get(2)).getQualifiedName()); incUseCount(2); TestCase.assertEquals("Baaaaaaar", ((JavaPsiClassReferenceElement)getLookup().getItems().get(0)).getQualifiedName());// same package TestCase.assertEquals("zoo.Baaaaaaar", ((JavaPsiClassReferenceElement)getLookup().getItems().get(1)).getQualifiedName()); TestCase.assertEquals("boo.Baaaaaaar", ((JavaPsiClassReferenceElement)getLookup().getItems().get(2)).getQualifiedName()); }