It almost sounds as though it was simply mechanical, like when the doctor hits you on the knee in the right spot with a little hammer and your leg kicks out by reflex action. It was too bad the tech did not take you seriously, your reaction was doubtless nothing she intended to have happen. If you think she was callous, you could file a complaint with her boss, but if she seemed genuinely not to have expected this, I don't think I would. My guess would be that some guys are more reflexive than others, and though it was just a mechanical reaction it was not something that she could have predicted (and therefore should have taken immediate steps to avoid). Just my opinion.
It happens! it happened to me when a therapist was working on my hip with this tiny towel covering me. Don't worry about it :>)
I'm 32 married and I just got my first testicular sonogram. I had a mild injury to my testicles while wrestling and wanted to see if this was effecting my ability to get my wife pregnant. I asked if a female tech was available for the proceedure, because I was concerned about becoming erect, because my testicles are extemely sensitive. But none was available, so the male tech did it. He seemed cool and mentioned his wife, which put me at ease. The proceedure lasts about 25 minutes. They apply this wet gel that is a little cool to the area, and then gently rub a probe around to take pics of your testicle. This is done in a non-sexual way. He talked to me about the Yankees for most of the time. I was soft for the first 10 mins or so, too. But I became uncomfortable when I suddenly started to feel my penis tingling, like it might start to become erect. I started to shift around on the table to concentrate and make it go down. The tech asked me if I was OK, and said it was perfectly normal to become erect. Just him commenting about it made be embarassed. He asked me if my wife had any trouble with me entering her because of my size when erect. The question made me feel weird, though. I actually asked him to stop about 10 minutes later, because began to pre-***, was very erect, and I thought I might ejaculate. He said I should "release the ejaculate", that they needed to test my sperm anyway (my wife was having trouble getting pregnant). He told me to close my eyes and imagine I was somewhere else. He moved the probe up and down my penis, which he said he needed to do to increase the bloodflow to the area. I closed my eyes and thought of my wife, just to get the whole thing over with. I ejaculated quickly, he scooped it up into a test tube. I could not look at him, and will only do this proceedure with females in the future. If you don't need your semen tested, and have to get the test with a male, I would recommend masturbating immediately before to lessen the chance of becoming erect. I never told anyone this story. My wife could tell I was upset, but she doesn't know what happened. Now when I think of what happened it makes me angry at the tech, even if he was just doing his job.