The massive flow of refugees and the way to manage it are the biggest challenges facing the EU since it was set up.