void (@NotNull Filter.ResultItem actualItem, @NotNull UrlFilterTest.LinkInfo expectedLinkInfo) { assertEquals(expectedLinkInfo.myHighlightStartOffset, actualItem.getHighlightStartOffset()); assertEquals(expectedLinkInfo.myHighlightEndOffset, actualItem.getHighlightEndOffset()); if (expectedLinkInfo instanceof FileLinkInfo) { assertInstanceOf(actualItem.getHyperlinkInfo(), UrlFilter.FileUrlHyperlinkInfo.class); assertFileLink((FileLinkInfo)expectedLinkInfo, (UrlFilter.FileUrlHyperlinkInfo)actualItem.getHyperlinkInfo()); } else { assertInstanceOf(actualItem.getHyperlinkInfo(), OpenUrlHyperlinkInfo.class); } }