Every Mac model has its own components different than any other, and the Apple Hardware Test is unique to each model. A handful of models share one AHT. A pile of them are available for download but are obscured behind a non-obvious naming convention. A partial list is hereand here. Unfortunately Apple simply doesn't make it easy to figure out how to restore this.
What I've learned is that pretty much all intel Macs before 10.7 did have AHT preloaded on the drive, found in hidden folder /System/Library/CoreServices/.dianostics. If you reformat the drive and reinstall, this is not reinstalled. And if you encrypt the drive with File Vault 2 it would be unavailable in any case. With 10.7 and newer hardware, the AHT is stuffed into an AHTxx.dmg file and found on the Recovery HD volume, also in a hidden directory. So it can still be used when FV2 encryption is enabled.
Since install disks are gone, I don't actually know how current Mac owners are supposed to get this restored, however also since that time, Apple has moved to firmware that can load the proper version of AHT via option-D on boot with a wired or wireless internet connection. It doesn't permanently download this to disk, the firmware downloads and runs it, and upon reboot it's gone again.
So the gist is, once you've lost the installed version of AHT, you either need the AHT disk that came with your computer or buy one from Apple or go to an Apple store and they'll run it for you. Or you have a newer Mac with firmware that can talk to Apple directly (pretty much anything 2010 and newer) over the internet.