On the other hand, if there was sufficient fuel for the planned test, and the examiner then directed the student to deviate from the planned test to a route that would lead to fuel exhaustion, the student should know this as well, and either refuse to fly it as it is unsafe, or suggest an alternate course of action.
It's pretty simple IMHO: Examiner asks for further exercise to be completed, student replies with "unable, we have insufficient fuel remaining".
Whether or not the student supplied enough fuel to complete the test is a separate issue from flying the plane to fuel exhaustion. The aircraft may be unable to carry full tanks with both the student and examiner on board, for example. The instructor should absolutely be aware of the endurance, however, the student should also be aware.
I suppose it would all depend on what was discussed before the test. Was this a planned 2 hour test that the examiner extended to 4 hours, with 3 hours' fuel on board? Or was this a planned 2 hour test, for which the student supplied 1 hour of fuel?