Testing randomness and classes