Diagnosis typically involves a physical examination by a healthcare provider. If an infection is suspected, a sample of the fluid may be taken for laboratory analysis. In some cases, imaging tests like ultrasounds may be used to get a clearer view of the cyst.