The patient takes a lactulose or glucose solution, and then the hydrogen in the exhaled air is measured at intervals. If there is an early increase, it suggests that there is excess bacteria in the small intestine.