void (List<? extends LookupElement> items) { Map<List<?>, LookupElement> presentations = new HashMap<>(); for (LookupElement item : items) { LookupElementPresentation p = TestLookupElementPresentation.renderReal(item); if (seemsTruncated(p.getItemText()) || seemsTruncated(p.getTailText()) || seemsTruncated(p.getTypeText())) { continue; } List<Object> info = Arrays.asList(TestLookupElementPresentation.unwrapIcon(p.getIcon()), p.getItemText(), p.getItemTextForeground(), p.isItemTextBold(), p.isItemTextUnderlined(), p.getTailFragments(), p.getTypeText(), TestLookupElementPresentation.unwrapIcon(p.getTypeIcon()), p.isTypeGrayed(), p.isStrikeout()); var prev = presentations.put(info, item); if (prev != null && !myPolicy.areDuplicatesOk(prev, item)) { TestCase.fail("Duplicate suggestions: " + p); } } }