Cancerous growths, if any are found, can also be taken out for further examination. This is a called a biopsy. Biopsies are also done to test for certain bacteria that cause ulcers.