Verify behavior of a service method using @Mock annotation
Preconditions (2)
Step 1: Create a test class for the service
Step 2: Annotate the repository interface field with @Mock
Step 3: Annotate the service class field with @InjectMocks
Step 4: Initialize mocks using MockitoAnnotations.openMocks(this) in a setup method
Step 5: Stub the repository method to return a fixed value when called
Step 6: Call the service method that uses the repository
Step 7: Verify the returned value matches the stubbed value
✅ Expected Result: The service method returns the stubbed value from the mocked repository, confirming @Mock works correctly