void () { createMarker("abc", 0, 0); WriteAction.run(() -> { synchronizer.startTransaction(getProject(), document, psiFile); synchronizer.replaceString(document, 0, 1, "xy"); synchronizer.replaceString(document, 3, 4, "yz"); synchronizer.replaceString(document, 0, 5, "xxx"); synchronizer.commitTransaction(document); assertEquals("xxx", document.getText()); }); }