void () { final String text = "this is a string with(fold region), end)\n" + "second string"; init(40, text); int start = text.indexOf("fold"); int end = text.indexOf(','); addCollapsedFoldRegion(start, end, "this is a really long fold region placeholder"); checkSoftWraps(start, end); assertEquals(new VisualPosition(3, 0), getEditor().offsetToVisualPosition(text.indexOf("second"))); }