What happens

Test vehicles can't be sold. They might keep parts for further testing, or for reference, but I presume they are mostly scrapped. I recall seeing an image of some seemingly new Aston martins stacked on top of each other on a transporter. Even though they were undamaged before, they could not be sold.
 
Just a guess, but I'd imagine they have to keep some of them for research and future reference purposes. Maybe for a given amount of time, then I imagine scrapped or recycled.