Use a fake object to test user service without real database
Preconditions (2)
Step 1: Create a fake UserRepository that returns a fixed User for id=1
Step 2: Inject the fake UserRepository into UserService
Step 3: Call UserService.getUserName(1)
Step 4: Verify the returned user name matches the fake user's name
✅ Expected Result: UserService returns the name of the fake user without accessing a real database