Rationalizing rational expectations: Characterizations and tests