void () { doTest(); String message = InspectionGadgetsBundle.message("anonymous.inner.may.be.named.static.inner.class.quickfix"); final IntentionAction intention = myFixture.getAvailableIntention(message); assertNotNull(intention); String text = myFixture.getIntentionPreviewText(intention); assertEquals(""" interface A { default void sample() { Thread thread = new Thread(new MyRunnable()); } class MyRunnable implements Runnable { @Override public void run() { } } }""", text); }