I Am Legend scrapped its original ending because test audiences 'felt cheated' by the big twist
Discussion
(winteriscoming.net)
Test audiences also ruined the ending to Scott Pilgrim, if the sources can be trusted. I don't have a lot of faith in Will Smith, not that he is a bad person.