void (String line, String expectedPath) { int expectedStart = line.indexOf(expectedPath); List<Filter.Result> results = applyFilter(line); Assert.assertEquals(1, results.size()); Filter.Result filterResult = results.get(0); List<Filter.ResultItem> resultItems = filterResult.getResultItems(); Assert.assertEquals(1, resultItems.size()); Filter.ResultItem resultItem = resultItems.get(0); Assert.assertTrue(resultItem.getHyperlinkInfo() instanceof OpenFileHyperlinkInfo); Assert.assertEquals(expectedPath, ((OpenFileHyperlinkInfo)resultItem.getHyperlinkInfo()).getVirtualFile().getCanonicalPath()); Assert.assertEquals(expectedStart + expectedPath.length(), resultItem.getHighlightEndOffset()); }