If all of the examiner's licences have expired he is then technically a passenger so theoretically the person taking the test is flying illegally. Therefore its not just him that could get into trouble (even though I seriously doubt you would be prosecuted).
'He' wouldn't be prosecuted. To make that argument you would have to prove that the Pilot being tested was a 'Student' and therefore if he was flying as a 'Student' he would have been flying under the supervision (and de facto approval) of his Instructor and therefore, if anyone, the Instructor would be liable.
Not one for creating extra legislation but from the responses in this thread it is clear that there are reservations about asking an Examiner for sight of his documents for fear of prejudicing the conduct of following flight test or as a matter of insulting a 'superior'. Both reasons go against basic CRM training and accidents have resulted. Therefore I believe it would not be unreasonable to suggest a quick line in the ANO or whatever relevant document(s) to state "The examiner will make available to the candidate his/her relevant Licence/Rating/Medical to conduct the flight as part of the pre flight briefing before conducting any flight test" Sorted.
Failing that, (or in addition to), we could follow suit with the FAA system and make all Flight Crew qualifications publicly available.
My 2p
4B