I have discussed with @lfryc Lukas how to test it. Not sure whether I understand it correctly. But he said that "javascriptservice callback should be called after the oncomplete callback".

However, it is other way round.

He also advised me to ensure that events are called in this order:
oncomplete ---> javascriptService --> javascriptServiceComplete
I am not sure whether I am testing  javascriptService --> javascriptServiceComplete correctly ?