Diagnosis or Hardware Test on a mid 2009 Macbook Pro with MacOS 10.9.2
The Apple Hardware Test is included in the installation DVD. Insert it, hold D and boot from it.

If you don't have the installation DVD at hand, have a look at https://github.com/upekkha/AppleHardwareTest