Of course, refurbished Apple products are fully tested. In fact, when an Apple product is getting refurbished, testing is one of the most important stages. The testing process includes hardware tests, software tests and thorough checking of all components. Most parts, if not all, will pass the checks with flying colors.
If any issues are found, the faulty parts will go through troubleshooting. If the part can be fixed, the refurbisher will opt for this option. For instance, a loose wire on a MacBook motherboard can easily be reconnected.
If the problem cannot be fixed, the refurbisher will replace the part with a brand new one. This goes for cracked screens, which automatically get replaced with a brand new screen.
Once the fixes or replacements have been completed, the refurbished product goes through the entire product testing process again. Refurbished Apple products go through the same testing process as any new Apple product does.
A refurbished product is only approved for sale once it passes all functional testing.