{
  "id": "java/mockito-void-method-stub",
  "signature": "org.mockito.exceptions.misusing.UnfinishedVerificationException: Missing method call for verify(mock) here:",
  "signature_zh": "未完成的验证异常：此处 verify(mock) 缺少方法调用",
  "regex": "org\\.mockito\\.exceptions\\.misusing\\.UnfinishedVerificationException:\\ Missing\\ method\\ call\\ for\\ verify\\(mock\\)\\ here:",
  "domain": "java",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Trying to stub a void method with when() instead of doNothing() or doThrow(), or verify syntax error.",
  "root_cause_type": "generic",
  "root_cause_zh": "尝试使用 when() 而不是 doNothing() 或 doThrow() 来桩化 void 方法，或 verify 语法错误。",
  "versions": [
    {
      "version": "8+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Using when(mock.voidMethod()).thenReturn(value)",
      "why_fails": "void methods cannot return values; causes compilation or runtime error.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using verify(mock) without method call",
      "why_fails": "verify requires a method call to verify.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use doNothing() for void methods",
      "success_rate": 0.95,
      "how": "doNothing().when(mock).voidMethod();",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use doThrow() for void methods",
      "success_rate": 0.9,
      "how": "doThrow(new RuntimeException()).when(mock).voidMethod();",
      "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-01-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}