What could produce pain in the right testicle and the upper inner thigh?

Testis torsion. Needs to be ruled out if pain is severe & of sudden onset. If scrotum is swollen &/or right testicle is higher than normal &/or spermatic cord it scrotal necjk is tender. Advise visit to er asap. Other causes could be epididymitis, torsion of appendix testis or hernia. Need 2b seen if pain severe.