void () { CodeStyleSettings temp = CodeStyle.createTestSettings(); CodeStyle.doWithTemporarySettings(getProject(), temp, () -> { String text = """ class X { void f(Runnable dddd) { f(()->{});vvdds<caret> } }"""; myFixture.configureByText("x.java", text); myFixture.type("abc"); LayoutCodeOptions options = new ReformatCodeRunOptions(WHOLE_FILE).setOptimizeImports(true); FileInEditorProcessor processor = new FileInEditorProcessor(myFixture.getFile(), myFixture.getEditor(), options); processor.processCode(); myFixture.checkResult(""" class X { void f(Runnable dddd) { f(() -> { }); vvddsabc } }"""); }); }