void (LookupElement element, String expected) { LookupElementPresentation presentation = new LookupElementPresentation(); element.renderElement(presentation); Icon icon = presentation.getIcon(); String iconTag = icon == AllIcons.General.ShowInfos ? "[d] " : icon == AllIcons.General.ShowWarning ? "[e] " : ""; String actual = iconTag + presentation.getItemText() + "|" + presentation.getTailText() + "/" + presentation.getTypeText(); assertEquals(expected, actual); }