Unit test for RegisterController