The joke is a pun. To become 'testy' is to be irritable or angered easily.  'Testy' sounds similar to 'testicles' which are the male genitalia found in the groin area.
When I suffered a groin injury I became quite testy .