void () { RangeMarker marker = createMarker("fooFooFoo fooFooFoo", 10, 19); WriteAction.run(() -> { synchronizer.startTransaction(getProject(), document, psiFile); synchronizer.replaceString(document, 0, 9, "xxx"); synchronizer.replaceString(document, 4, 13, "xxx"); synchronizer.commitTransaction(document); assertValidMarker(marker, 4, 7); }); }