I had one exam of this kind when I was a teenager:
Soon after turning 15, I went to my pediatrician for a regular checkup, since it had been a couple of years since I had one by then. At the end of the exam, she suggested I should go to a specialist for teenagers, who would give me some necessary advice, and would do a more appropriate examination for my age, and also to lessen the "shock" once I started going to doctors for adults.
I went under the conviction I was to be examined by a male doctor, which I figured out would have been more appropriate at that stage. However, my surprise was not at all small when I was called in the examination room by a female, who (even though I almost expected to be a nurse), was to be my doctor that day.
The exam went almost as had been usual by then: first some questions and chat about my life (though a bit more focused on the issues an adolescent might have), followed by weight and height. Then came the usual physical examination: eyes, ears, heart and lungs.
After that, I was told to lie on the examination table, and to loosen the belt and one button on my trousers, so she could perform the abdominal exam.
I thought that would be it, since she was not wearing gloves, but I was to be surprised once more: after examining my abdomen, she just undid the zipper of my trousers, opened them (didn't lower them), and lowered the front of my underware, to begin with a thorough genital exam: first she checked my pubic hair for distribution and (I suspect) any lesions, then she moved to my testicles, which she palpated once at a time, concluding with my penis. Since I'm uncircumcised, she dedicated some seconds to lower the foreskin, and examined the glans throughly. While holding my penis with one hand, she pointed with the other the areas I should be more careful when cleaning it. All this holding and touching caused an erection for me, which, somewhat surprisingly, I didn't find really embarrassing (I guess because she made me feel really comfortable during the exam). After noticing that erection, she replaced the foreskin, and pulled it back again, saying it was good that it could glide freely even in that state, before replacing it again, leaving me to redress myself, while she washed her hands.
After that ensued a little chat about how erections arose, the use of condoms, and some other stuff related to my sexuality, with which she concluded that exam. It's a pity she only examines teenagers (or so I've been told), since she was probably one of the most trustful doctors I've ever visited.