void () { PsiClass childClass = myFixture.addClass("package foo; class Child extends Parent {}"); PsiClass grandChildClass = myFixture.addClass("package foo; class GrandChild extends Child {}"); myFixture.configureByText("Parent.java", "package foo; sealed class Parent permits <caret>Child {}"); doTest(true); assertEquals("sealed class Child extends Parent permits GrandChild {}", childClass.getText()); assertEquals("non-sealed class GrandChild extends Child {}", grandChildClass.getText()); }