void () { String text = """ class Test { void test() { new Runnable() { public void run() throws Asadfsdafdfasd { System.out.println(<caret>); } }; } }"""; configure(text); FoldingModelImpl foldingModel = (FoldingModelImpl)myFixture.getEditor().getFoldingModel(); assertNull(foldingModel.getCollapsedRegionAtOffset(text.indexOf("Runnable"))); }