void () { UISettings.getInstance().setSortLookupElementsLexicographically(true); myFixture.addClass("package pack1; public class SameNamed {}"); myFixture.addClass("package pack2; public class SameNamed {}"); checkPreferredItems(1, "SameNamed", "SameNamed"); assertTrue(NormalCompletionTestCase.renderElement(myFixture.getLookupElements()[0]).getTailText().contains("pack1")); assertTrue(NormalCompletionTestCase.renderElement(myFixture.getLookupElements()[1]).getTailText().contains("pack2")); }