Added tests for random sampling feature of controller and fixed 2 typos