{
  "fixtureId": "fixture-lab-loan-eligibility",
  "contractName": "checkLabLoanEligibility",
  "lessonIds": [
    "compare-nested-vs-combined-rules",
    "verify-every-branch-reaches-end"
  ],
  "invalidInputPolicy": "Throw or return INVALID_LOAN_INPUT error when hasStudentId is not a boolean or overdueCount is not a non-negative integer.",
  "cases": [
    {
      "caseId": "loan-typical-approved",
      "kind": "typical",
      "input": {
        "hasStudentId": true,
        "overdueCount": 0
      },
      "expected": "Approved",
      "reason": "Both nested checks pass and reach Approved.",
      "catchesBug": "Catches inverted condition on either diamond."
    },
    {
      "caseId": "loan-typical-missing-id",
      "kind": "typical",
      "input": {
        "hasStudentId": false,
        "overdueCount": 0
      },
      "expected": "Declined: Missing student ID",
      "reason": "Outer check fails and returns ID-specific decline message.",
      "catchesBug": "Catches flat AND condition that hides the missing ID reason."
    },
    {
      "caseId": "loan-boundary-one-overdue",
      "kind": "boundary",
      "input": {
        "hasStudentId": true,
        "overdueCount": 1
      },
      "expected": "Declined: Return overdue items first",
      "reason": "Boundary overdueCount = 1 fails overdueCount == 0 check.",
      "catchesBug": "Catches dangling No branch or overdueCount > 1 off-by-one mistake."
    },
    {
      "caseId": "loan-invalid-negative-overdue",
      "kind": "invalid",
      "input": {
        "hasStudentId": true,
        "overdueCount": -1
      },
      "expectedError": "INVALID_LOAN_INPUT",
      "reason": "Negative overdueCount violates invalidInputPolicy.",
      "catchesBug": "Catches treating negative overdueCount as failing == 0 without validating input."
    }
  ]
}
