void () { VirtualFile file = getTempDir().createVirtualFile(".txt", "hkjh"); Icon icon = IconUtil.getIcon(file, Iconable.ICON_FLAG_VISIBILITY, getProject()); assertTrue(icon instanceof DeferredIcon); Graphics g = IconTestUtil.createMockGraphics(); // force to eval icon.paintIcon(new JLabel(), g, 0, 0); // give chance to evaluate TimeoutUtil.sleep(1000); Icon icon2 = IconUtil.getIcon(file, Iconable.ICON_FLAG_VISIBILITY, getProject()); assertThat(icon2).isNotInstanceOf(DeferredIcon.class); assertThat(icon).isNotSameAs(icon2); FileContentUtilCore.reparseFiles(file); Icon icon3 = IconUtil.getIcon(file, Iconable.ICON_FLAG_VISIBILITY, getProject()); assertThat(icon2).isNotSameAs(icon3); }