The case Bundesrepublik Deutschland v Y & Z  EUECJ C-71/11 involved two Ahmadi Muslims who went to Germany from Pakistan and were threatened with deportation. They appealed to the ECJ on the basis that the German Courts were wrongly applying European Council Directive 2004/83/EC which establishes a common definition of refugee status throughout the EU. In Pakistan the Amhadi Muslim community suffers a considerable degree of Religious persecution including the fact that they are not allowed to call themselves Muslims or call their Mosques "Mosques".
The German Courts originally decided that the two could be deported because they would still be able to have their beliefs the law merely prevented them publicly practicing their beliefs. As the ECJ put it in para 42 of its decision
there could be deemed to be persecution relevant for the purposes of the right of asylum only where there was interference with the ‘core areas’ of religious freedom, but not where there were restrictions on the public practice of faith,
The ECJ disagreed with this approach and decided that a fear of religious persecution was well founded where (para 81)
The point that merely being allowed to pray privately is not enough to prevent persecution is particularly interesting because it goes contrary to the arguments of the UK government in the 4 Religious Freedom cases currently before the European Court of Human Rights, the UK Government and indeed UK courts have taken the view that Religious practice is entirely private and perhaps this case may have some relevance in causing that view to be questioned.
The logic of the ECJ decision is similar to that in a decision made by the UK Supreme Court in HJ (Iran) v Secretary of State for the Home Department (Rev 1)  UKSC 31 - which related to Gay Asylum seekers from Iran. The Supreme Court had held that Homosexuals had to be allowed to practice Homosexuality openly otherwise they were being persecuted and that logic should also be applied to the practice of a religion