Add unit tests to RegisterController