[Utils/Func] Added tests for throttle(), wrap(), when() and unless() and fixed some related bugs.