In recent years, there hasn't been much to like about the European Union, with its low growth, high unemployment, political squabbles, xenophobia, stifling bureaucracy and constant threats of a break-up.
But 2015 may have been the year the EU pulled through the worst of its troubles: It has now been sufficiently stress-tested to survive anything.
There were three types of trials: the viability of the eurozone, the survival of the Schengen borderless travel area and the tension between member countries' domestic politics and the union's values. In each case, the edifice creaked but remained standing. Despite the shocks, the European economy is more or less back to pre-crisis levels, with employment rising and growth returning.
First, the euro. Last year, the Euro Break-Up Index (calculated by Sentix, a German firm that measures investor sentiment) rose to the highest levels since its 2012 inception. The probability of the currency union's break-up looked very real in the spring and summer as Greece resisted attempts by northern EU countries to force it into a managed bailout.
Luminaries including the Nobel laureate Paul Krugman and Hans Werner Sinn, a German government adviser, favoured a Greek exit from the euro. The Greeks, however, didn't want to leave, and their firebrand Syriza government was forced to back down.
Greece experienced a 0.9pc contraction in the third quarter of 2015 because of the upheavals that almost tore apart the eurozone, and economists expect its output to shrink 0.7pc for the year. The country, however, is adopting economic reform legislation and getting support to recapitalise its banks.
Although Greeks have the least positive opinion of any EU citizens - just 22pc of citizens say they like the organisation, according to a November Eurobarometer poll - they have accepted EU aid and are more or less gamely taking their bitter medicine.
The third Greek bailout is ugly, contentious and even outrageous to some -both inside and outside Greece - but it reflects Greeks' preference for keeping the common currency.
That's easy to understand: the euro lost just 10pc of its value against the dollar,and its share in global foreign exchange reserves only dropped to 20.3pc in the first three quarters of 2015, from 22pc, according to IMF data. The Danish and Norwegian krones, the Australian, Canadian and New Zealand dollars all retreated more this year.
At the same time, economists polled by Bloomberg predicted 1.5pc economic growth for the eurozone this year - the best result since 2011 and only slightly less than the 1.8pc expected for the EU as a whole. It even holds up pretty well compared with the United States, which is expected to post growth of 2.5pc this year. Of course, Ireland is the star performer, with expected growth of almost 5pc.
As regards Schengen, things were not so clear cut. While refugees from Syria, Iraq, Afghanistan and other Middle Eastern war areas flooded into Europe, one of the united continent's achievements - borderless travel, aka the Schengen Agreement - seemed in jeopardy. The United Nations estimates that about a million refugees arrived in 2015, and Germany alone took in almost that many. From January through November, the number of asylum applications in Germany increased 132 pc from a year earlier. And yet the Schengen Agreement, which allows travellers to avoid passport checks between European countries, has not been suspended.
Despite the political uproar - 58pc of all Europeans and 76pc of Danes, Czechs and Germans believe immigration is the biggest problem facing the EU - one million is a fraction of the bloc's population of 506 million. Even two or three million migrants wouldn't overstrain the union, which added 1.3 million residents last year. Even in countries that accept most of the newcomers, no major hardship is expected.
According to Peter Praet, a member of the ECB executive board, Germany will need to spend an additional 0.3 to 0.4pc of economic output in 2016 and 2017 to accommodate and integrate the refugees. But the spending also will boost output.
Europe has been groping for solutions. It has promised Turkey €3bn to make a better effort to keep refugees in their camps and it has decided to invest more in common border protection. It's not clear how well that will work, but stepped-up efforts to prevent more migrant deaths at sea appear to be paying off.
The refugee influx, however, has been a huge political test for the EU. So far, its older and stronger members have passed it with good grades. Eastern Europe has buckled, showing it was ready to accept the union's economic benefits, such as billions of euros in farm subsidies, but not the humanitarian principles that membership imposes.
It has been a tough year, but Europe has endured. According to the November Eurobarometer, 53pc of Europeans are optimistic about the EU's future and only 41pc are pessimistic. In 2011, at the lowest point in the bloc's history, 48pc were optimists and 46pc didn't believe in the union. And Europeans still trust the EU more than they do their national governments, though trust in politicians is at its lowest level in years:
The EU and its most important institutions have enough support, and enough common sense built into them, to outlive their critics.
Now is a moment for retrenchment, not expansion or major progress in unification - but Europe is a long-term project.