story
There was recently a lawsuit in the Netherlands where someone sued Apple after receiving a refurbished phone after replacement under warranty [1]. She won the case:
https://www.iphoned.nl/nieuws/rechtszaak-apple-garantie/
The judge based his verdict on a verdict of the European Court of Justice [2], so it's likely that the outcome would be the same in other EU countries.
[1] 20 months would still fall under warranty in the EU.
[2] http://curia.europa.eu/juris/liste.jsf?language=en&num=C-404...