Yes, I would like to avoid this as well. However, I'm not sure how to use onseeked in the unit test since showPlayer itself, or the setVideoUrl anonymous callback function, sets onseeked to the doneSeeking function. If the unit test sets onseeked, it will get re-set during the execution of showPlayer.