unit tests for Dispatcher#register/unregister