The response to the incident tests the friendship between the New York mayor and the President.