void () { PsiFile file = findFile(createFile()); final Document document = getDocument(file); WriteCommandAction.runWriteCommandAction(null, () -> changeDocument(document, getPsiDocumentManager())); getPsiDocumentManager().commitDocument(document); assertEquals(0, getPsiDocumentManager().getUncommittedDocuments().length); }