void () { myFixture.addFileToProject("F1.java", """ public class F1 { boolean f; } """); doTest(); IntentionAction action = myFixture.findSingleIntention("Make 'f' volatile and add Thread.onSpinWait()"); var text = myFixture.getIntentionPreviewText(action); assertEquals(""" class F2 extends F1 { void test() { while (f) { Thread.onSpinWait(); } } } ---------- public class F1 { volatile boolean f; } """, text); }