refactored user unit tests