79261124

Date: 2024-12-07 18:20:39
Score: 1.5
Natty:
Report link

The issue occurs because the Times.exactly(1) conflicts with the current MockServer API. When you specify Times.exactly(1), MockServer enforces strict validation to ensure the request is matched exactly once. If there's a mismatch, it throws an error.

Removing Times.exactly(1) defaults to allowing unlimited calls (Times.unlimited()), bypassing the strict validation and preventing the error.

Solutions: Simplify: Remove Times.exactly(1) if precise matching isn't critical. Update Syntax: Replace Times.exactly(1) with a method more aligned with the updated API as for example Times.once()

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Miguel