How do you know if it’s heartburn or something more serious? Learn how doctors test for and diagnose this condition.