The Meares Stamey Test, also known as the four-glass test, is a diagnostic procedure primarily used to identify the presence of bacterial prostatitis. It involves collecting and analyzing urine and prostatic fluid samples to pinpoint the infection's location within the urinary tract.