Added register unit test

Added testing unit for register controller