Hi, Welcome to Healthcare Magic Forum.
If your testes hurt even at rest and you have fever
along with pain, you may be having Orchitis
(Testicular Infection). Do not delay, Kindly get yourself examined by a Urologist
. You may need a Blood and Urine Examination to rule out the infection.