Fix nullptr when try to get dispatcher instance
Add aditional dispatcher unit test
This unit tests test the assignment from function pointers to events.