Test of random index