{
  "id": "java/mockito-wrong-type-argument",
  "signature": "org.mockito.exceptions.misusing.InvalidUseOfMatchersException: Invalid use of argument matchers! 0 matchers expected, 1 recorded",
  "signature_zh": "参数匹配器使用无效：预期 0 个匹配器，但记录了 1 个",
  "regex": "org\\.mockito\\.exceptions\\.misusing\\.InvalidUseOfMatchersException:\\ Invalid\\ use\\ of\\ argument\\ matchers!\\ 0\\ matchers\\ expected,\\ 1\\ recorded",
  "domain": "java",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Mixing matchers and exact values in same method call, or using matchers outside of when/verify.",
  "root_cause_type": "generic",
  "root_cause_zh": "在同一方法调用中混合使用匹配器和精确值，或在 when/verify 之外使用匹配器。",
  "versions": [
    {
      "version": "8+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Using any() for all parameters",
      "why_fails": "May cause UnnecessaryStubbingException if not all used.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "Removing matchers and using exact values only",
      "why_fails": "Reduces test flexibility; may not match actual calls.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use matchers for all parameters consistently",
      "success_rate": 0.95,
      "how": "when(mock.method(anyString(), anyInt())).thenReturn(value);",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use eq() for exact values with matchers",
      "success_rate": 0.9,
      "how": "when(mock.method(eq(\"exact\"), anyInt())).thenReturn(value);",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-06-12",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}