unit test for registeration