I'm afraid there's no easy way that I know of to check; it's not the simplest job to reseat the cable. I doubt Apple Hardware Test would identify the problem — and even if it did, I don't know how it'd distinguish between the two.
Regardless, the assessment by Apple will be free of charge, even if your iMac is out of warranty, so I hope that's at least some comfort.