Added a test for register and unregister.