void () { initText("abc\ndef\ngh<caret>i"); FoldRegion region = addCollapsedFoldRegion(1, 11, "..."); runWriteCommand(()-> getEditor().getDocument().deleteString(7, 8)); runFoldingOperation(()-> region.setExpanded(true)); runFoldingOperation(()-> region.setExpanded(false)); assertFalse(region.isExpanded()); }