The Republic of Ireland will face world and European champions Spain in a friendly in New York this summer.