This infection can often be diagnosed with a skin test. Sometimes people with immune problems and young children may not show positive skin test results but they still have this infection. In these situations, coughed-up phlegm, fluid from the stomach, or a tissue specimen from an involved organ such as a lymph node will reveal the bacteria. Special stains are used to allow the bacteria to be seen with a microscope. A special lab test that detects the bacteria's genes may also be used.