If you partition the factory drive, or replace it with a new drive - you cannot recover the apple hardware test through any reasonable means. This was confirmed with a senior apple tech today. Even if you use the recovery tool to make a thumb drive, then use that thumb drive to recreate apple's recovery partition.. then use that recovery partition to resintall from the internet - it will not be placed back. The only way to then replace it is to find a factory fresh machine and copy it over using terminal from the mounted target disk.. and even that is iffy ( based on the source machine type. The stupidity keeps on rolling. The bottom line is, there is no way to do a real factory restore.