void () { UISettings.getInstance().setSortLookupElementsLexicographically(true); ArrayList<String> pkgs = new ArrayList<>(Arrays.asList("bar", "foo", "goo", "roo", "zoo")); for (String s : pkgs) { myFixture.addClass("package " + s + "; public class Foox {}"); } invokeCompletion(getTestName(false) + ".java"); for (int i = 0; i < pkgs.size(); i++) { assertTrue(NormalCompletionTestCase.renderElement(myFixture.getLookupElements()[i]).getTailText().contains(pkgs.get(i))); } }