Automate dynamic response verification using Answer interface in JUnit
Preconditions (3)
Step 1: Mock the service method to return different responses dynamically using Answer interface
Step 2: Call the service method with a test input
Step 3: Capture the returned response
Step 4: Verify the response matches the expected dynamic output
✅ Expected Result: The test should pass confirming the service method returns correct dynamic responses as mocked