Added unit tests for RegisterController.