Re: I know that military aircraft...
'If you are on the ground, how do you know it is functional...
Also in this case it appears that the autopilot was functional, but operated incorrectly'
Many systems allow dummy loads etc. to be applied that then make the system respond as if it was in flight, although obviously that doesn't give you 100% confidence in the system. E.g. for height hold engage the autopilot and then adjust the altimeter reference pressure and look for a response.
In this case the autopilot was functional, operated correctly, but the operation wasn't understood by the pilot.