We'll imagine it
787 had staff friends and family on it for some proving flights
When the A330 was introduced to JQ same deal, mates got a free scenic flight out of it
Yes but (hopefully) they were serviceable aircraft certified for revenue flight.
These were aircraft that had been in maintenance and had to have a test (proving) flight before they were cleared for revenue service.
Fairly sure no Company would allow that now, if for no other reason it would be because of insurance liability.