void () { myBuilder = createBuilder(" foo bar"); parseWhenEmptyElementAfterWhitespaceIsLastChild(); final ASTNode tree = myBuilder.getTreeBuilt(); new DummyHolder(getPsiManager(), (TreeElement)tree, null); myBuilder = createBuilder(" bar", tree); parseWhenEmptyElementAfterWhitespaceIsLastChild(); DebugUtil.performPsiModification(null, () -> { try { myBuilder.getTreeBuilt(); fail(); } catch (BlockSupport.ReparsedSuccessfullyException e) { e.getDiffLog().performActualPsiChange(tree.getPsi().getContainingFile()); } }); assertEquals(" bar", tree.getText()); }