void (String expectedState) { PsiDocumentManager.getInstance(getProject()).commitDocument(getEditor().getDocument()); runFoldingPass(); assertEquals(expectedState, Arrays.toString(getEditor().getFoldingModel().getAllFoldRegions())); }