void () { PsiJavaFile file = (PsiJavaFile)myFixture.addFileToProject("p1/P1.java", "package p1; public sealed interface P1 permits P2 {} final class P2 implements P1 {}"); PsiClass[] classes = file.getClasses(); LightClass permittedInheritorInCls = new LightClass(classes[1]); assertNull(HighlightClassUtil.checkExtendsSealedClass(permittedInheritorInCls, classes[0], classes[0].getPermitsList().getReferenceElements()[0])); }