An EGD test examines the lining of your esophagus, stomach, and duodenum. Learn what the procedure involves and how to prepare for it.