They would have been arrested for another reason. However, a random sequence would make it possible for us to do this kind of testing. It could not be argued that the person was arrested because of personal characteristics.
Legal drafting is obviously not my field, but if the random sequence is also retained, I think it's an acceptable approach, which would allow the testing to be carried out, while protecting the police officer's work.