void (FileMarkupInfo expected, FileMarkupInfo actual) { Assertions.assertEquals(expected, expected); List<HighlighterState> expectedHighlighters = expected.highlighters(); List<HighlighterState> actualHighlighters = actual.highlighters(); for (int i = 0; i < expectedHighlighters.size(); i++) { Icon expectedIcon = expectedHighlighters.get(i).gutterIcon(); Icon actualIcon = actualHighlighters.get(i).gutterIcon(); if (expectedIcon == null && actualIcon == null) { continue; } if (!(actualIcon instanceof CachedImageIcon actualCachedIcon)) { throw new AssertionError(actualIcon + " expected to be a CachedImageIcon"); } Assertions.assertEquals(((CachedImageIcon) expectedIcon).getUrl(), actualCachedIcon.getUrl()); } }