Diagnosis typically involves a combination of physical examination, patient history, and laboratory tests. Urinalysis and urine culture may be conducted to identify bacterial causes. Ultrasound imaging may also be used to assess the degree of inflammation and rule out other conditions such as testicular torsion or epididymitis.