void () { FoldingGroup group = FoldingGroup.newGroup("test"); getEditor().getFoldingModel().runBatchFoldingOperation( () -> myModel.createFoldRegion(0, 10, "...", group, false) ); addCollapsedFoldRegion(1, 10, "..."); runWriteCommand(() -> getEditor().getDocument().deleteString(0, 1)); List<FoldRegion> regions = myModel.getGroupedRegions(group); assertEmpty(regions); }