Refactored the tests with MockUser