void () { myFixture.copyFileToProject("customIcon.svg"); myFixture.configureByFile("CustomIcon.kt"); PsiElement element = myFixture.getElementAtCaret(); UField uElement = UastContextKt.toUElement(element, UField.class); VirtualFile iconFile = ProjectIconsAccessor.getInstance(getProject()).resolveIconFile(uElement.getUastInitializer()); assertNotNull(iconFile); assertEquals("customIcon.svg", iconFile.getName()); }