void () { IdeaTestUtil.withLevel(getModule(), LanguageLevel.JDK_15, () -> { try { configureByFile(BASE_PATH + getTestName(false) + ".java"); performExtractMethod(true, true, getEditor(), getFile(), getProject(), false, null, true, null, null, null); fail("Static modifier is forbidden inside inner classes"); } catch (PrepareFailedException ignored){ } }); }