Refactored Customer Registration and test for it