Added test for generating random position.