Coded permutations test