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