Endometriosis surgery

What type of surgery do you get to determine if you have endometriosis?

My doctor wants to send me for it but I'm nervous.

What's the recovery time like?