void () { VirtualFile scratch = ScratchRootType.getInstance() .createScratchFile(getProject(), PathUtil.makeFileName("scratch", "java"), JavaLanguage.INSTANCE, "class Scrat<caret>ch { }", ScratchFileService.Option.create_if_missing); assertNotNull(scratch); myFixture.configureFromExistingVirtualFile(scratch); IntentionAction intention = myFixture.findSingleIntention("Create subclass"); assertNotNull(intention); intention.invoke(myFixture.getProject(), myFixture.getEditor(), myFixture.getFile()); myFixture.checkResult(""" class Scratch { } class <caret>ScratchImpl extends Scratch { }"""); }