void () { PsiClass superClass = myFixture.addClass("abstract class Foo { Foo(int a) {} }"); myFixture.configureByText("a.java", "class Bar extends Foo { <caret>Bar() { } }"); boolean madeWritable = CodeInsightTestFixtureImpl.withReadOnlyFile(superClass.getContainingFile().getVirtualFile(), getProject(), () -> myFixture.launchAction( myFixture.findSingleIntention("Add package-private no-args constructor"))); assertEquals(2, superClass.getConstructors().length); assertTrue(madeWritable); }