correct the randomly selection of messages in a list in a test