Great Britain will vote Thursday on whether to remain in the European Union or to leave it, to exit — hence the name for the vote: "Brexit."

Ever since the United Kingdom joined the European Union's precursor, the Common Market, in 1973, it has been a rocky relationship. So before going to Britain, I visited a country where the relationship with the EU is anything but rocky, to see how the EU works at its best — and whether it might ever work that well for the United Kingdom.

I went to Luxembourg, the country with the highest per capita income of all 28 EU member states. Luxembourg city is home to several EU institutions, as well as a big international financial sector.

The country is about the size of Rhode Island, with a population of 543,000. In the EU, only Malta is smaller in population and area. Most residents of Luxembourg city, and almost half the residents of the whole country, are non-Luxembourgers. They're mostly from other EU countries.

Luxembourg borders Belgium and, more critical to its history, it is also sandwiched between Germany and France.

"Our history, in fact, is what determines how we see Europe," says Jean-Louis Wolzfeld, Luxembourg's ambassador to the United States. "We have spent the last centuries between two big land neighbors who were never friends."

That is an understatement. During World War II, Germany occupied Luxembourg for the second time in the 20th century. After the war, in the early 1950s, Luxembourg became a leader in creating new institutions designed to make yet another continental war impossible.

"The European project has given us for the first time, I think, in Europe's history, 70 years of peace," Wolzfeld says.

That's why hardly anyone today thinks of Europe as one of the world's war-torn regions, which it was for centuries. And for centuries, Luxembourg was a pawn in the war plans of larger powers.

Carlo Hein makes apple cider on land overlooking the Sure River. It's a densely forested landscape. We stand on a hillside road and he shows me where the Nazi lines had been, just across the river in Germany.

"The Germans were over there," he says. "Everybody had to go away, and here was the battle going on."

After the war, a Luxembourg-born French foreign minister, Robert Schuman, proposed a coal and steel community, giving supranational control over two commodities that countries used to build the weapons of war.

"It was always about peace," says Hein. "It was about working together."

Working together has proved to be good for business, too.

The EU is a customs union. Hein's apple cider from Luxembourg can be sold in other EU countries with no tariffs, just as cider from New York State is sold in New Jersey or Texas. So Luxembourg, with its half a million people, has easy access to a continental market of half a billion.

That's a much bigger advantage than the one British voters are considering this week. The U.K. has the world's fifth largest economy.

But the Rev. Ed Hone, an English Catholic priest who lives and works in Luxembourg, says that his little adoptive country epitomizes what today's Europe is all about. In the scenic riverside village of Schengen, Luxembourg, Germany and France are just a couple of hundred yards across the Moselle River.

"It's almost emblematic of a Europe without borders because it's so small," Hone says. "You take two steps this way, you're in Belgium, two steps that way, you're in France, and two steps the other, and you're in Germany."

In fact, 180,000 commuters come every day to Luxembourg from neighboring countries to work in its prosperous, polyglot economy. They do so thanks to a 1985 agreement hammered out by European ministers in a boat that was moored in Schengen. The agreement is named for its birthplace.

Martina Kneip, director of the European Museum in Schengen, has dual citizenship. She was born in Germany and lives in Luxembourg. Like most educated Luxembourgers, she speaks French. And she has learned Luxembourgish, a Germanic language.

"To be integrated, I think the language is the most important thing," she says.

In several key respects, Britain's relationship to the EU is very different from Luxembourg's. The U.K. never joined the Schengen area. It never adopted the EU's common currency, the euro. And far from being a landlocked mini-state, it is a former imperial power with a big economy and global ties to its former colonies. As for memories of war, it has the English Channel to protect against occupying invaders. The last ones came ashore in 1066.

Many Britons chafe at their nation's perceived loss of sovereignty to EU headquarters in Brussels. But Luxembourg's prime minister, Xavier Bettel, says what comes out of Brussels reflects the input of EU member nations. Like other strong EU advocates, Bettel is concerned that if the European Union makes too many concessions to Britain to induce the U.K. to stay in, the project of European integration will be weakened.

"I think it's not a menu, a la carte, where you choose what you want to stay in the European Union," he says.

And Bettel is unequivocal about what he hopes British voters will choose.

"Every British citizen has to watch himself in the mirror and realize that he's in a win-win situation," he says. "It's good for Europe to have the U.K. as a partner and it's good for the U.K. to be a European partner."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.