Throw error if the callback get’s called twice
Add test for calling callback twice
Refine test cases