void () { doTest(); String toolTipForeground = ColorUtil.toHtmlColor(UIUtil.getToolTipForeground()); String greyed = ColorUtil.toHtmlColor(UIUtil.getContextHelpForeground()); String red = ColorUtil.toHtmlColor(NamedColorUtil.getErrorForeground()); String expected = "<html><table>" + "<tr>" + "<td style='padding: 0px 16px 8px 4px;color: " + greyed + "'>Required type:</td>" + "<td style='padding: 0px 4px 8px 0px;'><font color=\"" + toolTipForeground + "\">int</font></td></tr>" + "<tr><td style='padding: 0px 16px 0px 4px;color: " + greyed + "'>Provided:</td>" + "<td style='padding: 0px 4px 0px 0px;'><font color=\"" + red + "\">String</font></td></tr>" + "</table>" + "</html>"; doHighlighting() .stream() .filter(info -> info.type == HighlightInfoType.ERROR) .forEach(info -> Assert.assertEquals(expected, info.getToolTip())); }