To pay or not to pay
The medical has nothing to do with it.
However, a test fee is not a charge for flying training. If the examiner dosn't have a CPL then he cannot charge when in his role as an Instructor but of course may charge an examination fee as an Examiner which is a different role completely. One of the situations not explicitly covered within the commercial rules but common sense applies.