Replaced function name with getrandombyprice
Added test cases