boolean (@NotNull HighlightInfo expectedInfo, @NotNull HighlightInfo info, boolean strictMatch) { if (expectedInfo == info) return true; boolean typeMatches = expectedInfo.type.equals(info.type) || !strictMatch && (expectedInfo.type == WHATEVER || info.type == WHATEVER); boolean textAttributesMatches = Comparing.equal(expectedInfo.getTextAttributes(null, null), info.getTextAttributes(null, null)) || !strictMatch && (expectedInfo.forcedTextAttributes == null || info.forcedTextAttributes == null); boolean attributesKeyMatches = !strictMatch && (expectedInfo.forcedTextAttributesKey == null || info.forcedTextAttributesKey == null) || Objects.equals(expectedInfo.forcedTextAttributesKey, info.forcedTextAttributesKey); return haveSamePresentation(info, expectedInfo, strictMatch) && info.getSeverity() == expectedInfo.getSeverity() && typeMatches && textAttributesMatches && attributesKeyMatches; }