{
  "id": "java/junit-nested-test-not-inner",
  "signature": "org.junit.jupiter.api.extension.TestInstantiationException: Test class [com.example.OuterTest$InnerTest] must be a static inner class",
  "signature_zh": "测试实例化异常：测试类 [com.example.OuterTest$InnerTest] 必须是静态内部类",
  "regex": "org\\.junit\\.jupiter\\.api\\.extension\\.TestInstantiationException:\\ Test\\ class\\ \\[com\\.example\\.OuterTest\\$InnerTest\\]\\ must\\ be\\ a\\ static\\ inner\\ class",
  "domain": "java",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "@Nested test classes must be static inner classes, but they are non-static.",
  "root_cause_type": "generic",
  "root_cause_zh": "@Nested 测试类必须是静态内部类，但当前是非静态的。",
  "versions": [
    {
      "version": "8+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Removing @Nested annotation",
      "why_fails": "Loses organizational structure; tests may run but not nested.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Making outer class non-static",
      "why_fails": "Outer class must be static for @Nested to work.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Add static modifier to inner class",
      "success_rate": 0.95,
      "how": "@Nested\nstatic class InnerTest {\n    @Test\n    void test() { }\n}",
      "condition": "",
      "sources": []
    },
    {
      "action": "Move test methods to outer class",
      "success_rate": 0.8,
      "how": "// Remove @Nested and put tests directly in outer class",
      "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.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-04-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}