improve function/throttle spec, change time/now to allow mocking it + improve mockRandom