void () { myModel.runBatchFoldingOperation(() -> { FoldRegion region = myModel.addFoldRegion(5, 10, "."); assertNotNull(region); region = myModel.addFoldRegion(7, 11, "."); assertNull(region); region = myModel.addFoldRegion(20, 30, "."); assertNotNull(region); region = myModel.addFoldRegion(9, 12, "."); assertNull(region); region = myModel.addFoldRegion(7, 10, "."); assertNotNull(region); region = myModel.addFoldRegion(7, 10, "."); assertNull(region); region = myModel.addFoldRegion(5, 30, "."); assertNotNull(region); }); }