Testing the accuracy of clustering redshifts with simulations