Stress can cause a whole host of physical problems in animals and humans.
I obtained a urine sample by getting Ritz (female, two years old; rescue cat) to pee on non-absorbant type litter and then using a syringe to get the urine into a plastic jar. Not as hard as it sounds. Plastic seed beads from a craft store work well. Seed beads are very tiny beads, you can sew with them. Or, get special litter from your vet. That way you don't have to take your cat to the vet.
Ritz' first sympton was going in and out of the litter box, nine times in 90 minutes, usually after an initial bit of pooping/peeing. The symptom that got my and the vet's attention was blood on stool. Vet thought it was colitis or a GI distubance and prescribed Flagyl (liquid), which didn't help. Then the vet asked for a urine sample, and that's what pointed to a UTI (high level of white blood cells and bacteria). Ritz has been on Baytril for almost three weeks; last dose is tomorrow. No further "litter box dancing".
Around the time she first started showing symptons was when several repairmen were at my condo, over a seven day period. I rarely have strange people over to my condo so Ritz was freaked out. One of the most common causes of UTI is diet (dry food; with male cats, lots of fish) and stress. Ergo, I think that's what caused Ritz' GI/UTI.