The NA62 RICH detector is used for the separation of pions and muons in the momentum range 15-35 GeV/c and is expected to provide a muon suppression factor better than 10-2. A prototype of the final detector equipped with about 400 PMs (RICH-400 prototype) was built and tested in a dedicated run in 2009. The π-μ separation was tested, as well as the effect of the contamination of the neon radiator with different amounts of oxygen and CO2. The μ misidentification probability is about 0.7% and the time resolution better than 100 ps in the whole momentum range. We did not observe any absorption of the light due to the contamination of the radiator, however an effect on the ring radius is clearly observed due to the change of the refractive index of the medium. The conclusion of the studies is that the amount of CO2 in the final detector should be known at the 10-3 level of precision or the quality of the pion identification could be seriously compromised.