I think the answer is in Std Doc 24A. You do not need a valid medical for the test if it is flown in a simulator only so long as you do not exercise any privileges of the licence.
1.14.3Applicant’s Medical Certificate expired or absent
Where the applicant for the LPC has a valid licence but an expired, missing or suspended medical certificate, the test may be conducted (in a simulator only). If successful, the Certificate of Revalidation should be signed in the normal manner. The applicant shall be told that they cannot exercise the privileges of that rating until they have a valid medical.
The examiner should sign SRG1119 and/or complete the Examiner Report Form (SRG2199) as proof of a completed test/check, adding a clear note in Section 8 of SRG1119 and/or on the SRG2199 “applicant’s medical expired/was not presented and give it to the applicant for submission to licensing.
An applicant holding a UK issued EASA licence may hold a medical certificate issued by another EASA member state but their medical records shall be held by the UK CAA.