void () { myFoldingSettings.setCollapseAnonymousClasses(true); String text = """ class Test { void test() { Runnable action = () -> { System.out.println(); }; } } """; configure(text); FoldingModelImpl foldingModel = (FoldingModelImpl)myFixture.getEditor().getFoldingModel(); final FoldRegion offset = foldingModel.getCollapsedRegionAtOffset(text.indexOf("System.out.println")); assertEquals("{...}", offset.getPlaceholderText()); }