I Am Legend scrapped its original ending because test audiences 'felt cheated' by the big twist
Discussion
(winteriscoming.net)
Fair enough, haven't watched I Am Legend, so can't comment on that specifically. There's quite a few examples of movie endings being changed from the script after test audiences have watched though. The contract of Brad Pitt in Seven stated that they couldn't change the ending, but sure enough, they wanted to do it.