[SJS-162]: Write tests for _wait() function