You need one of those machines from CSI, NCIS, Bones, etc... that tells you the composition of something in exactly 2.2 seconds. That and who killed the prostitute with a heart of gold. Man, what don't those machines know?!
In reality, you'd probably need a GC/MS, pocket-sized preferrably.
If at this restaurant your dinner for two didn't cost at least $200 or if you haven't seen the restaurant's employees shopping for the restaurant at the farmers market, you can assume it's not real olive oil.
Taste it. But, also know what olive oil actually tastes like. I did a herb and olive oil dip, and a friend asked if I put anything hot in it, because she was feeling the peppery bite of actual extra virgin olive oil.
If you can't taste olives, it tastes stale or overly "oily," don't eat it.
Pure olive oil is quite rarely sold in grocery stores. All of the large name brand olive oils are cut with something else, or else use older olives than was once traditional. If anyone is really interested in this evolution, you should read "Extra Virginity", it's a fantastic book on the subject.
I used to buy the sardines packed in olive oil, but then I heard about this problem. If the Mafia is adulterating the olive oil with cheaper oils before it even leaves Italy, then the best option is to not buy olive oil at all. So, I switched what I buy now- sardines in tomato sauce or water- and then I add fat in that I have confidence in. I think this change has led to some improvement in general.