void () { init(""" class Foo { void m() { System.out.println(); System.out.println(); } }""", JavaFileType.INSTANCE); buildInitialFoldRegions(); executeAction(IdeActions.ACTION_COLLAPSE_ALL_REGIONS); runFoldingPass(true); assertEquals(1, getEditor().getFoldingModel().getAllFoldRegions().length); }