void () { addFoldRegion(10, 20, "outer"); FoldRegion inner = addFoldRegion(15, 20, "inner"); myModel.runBatchFoldingOperation(() -> inner.setExpanded(false)); Assert.assertArrayEquals(new FoldRegion[]{inner}, myModel.fetchTopLevel()); }