void () { int offset = myRandom.nextInt(myDocument.getTextLength() + 1); runWriteCommand(() -> myDocument.insertString(offset, StringUtil.repeat(" ", myRandom.nextInt(MAX_CHARS_PER_OPERATION) + 1))); }