STDs require either penetration or direct skin to skin contact to transmit - either oral, vaginal or anal sex, or direct, unclothed, oral to genital, genital to genital or genital to anal contact, usually with friction.
Hands do not transmit STDs. Mutual masturbation doesn't transmit STDs.
Sore testicles could be anxiety.
Your tests are negative. You can let this go. Hand jobs have no risk. :)