restoreUserSvc testing and refactor