public function testThatRandomItemIsReturnedViaRandom()
 {
     //Test that null is returned if an empty array is provdied
     $this->assertEquals(null, CollectionUtility::random([]));
     //Test rest of function
     $items = [["a" => 1], ["a" => 2]];
     $attempts = 0;
     $different = false;
     $random_item = null;
     $previous_item = null;
     while ($attempts++ < 50) {
         //just get one entry where last one is not equal to this one
         $random_item = CollectionUtility::random($items);
         if (isset($previous_item) && $previous_item != $random_item) {
             $different = true;
             break;
         }
         $previous_item = $random_item;
     }
     if (!$different) {
         $this->fail("Same item returned every time over 50 tests, probably not random but run test again to be sure");
     }
 }