{
  "fictional": true,
  "unit": "integer minor units; 100 per fictional CU",
  "records": [
    {
      "intake": "I01",
      "transport": "T01",
      "source": "POS-A",
      "outlet": "North",
      "order": "O100",
      "event": "S100",
      "revision": 1,
      "type": "sale",
      "minorUnits": 10000
    },
    {
      "intake": "I02",
      "transport": "T02",
      "source": "POS-A",
      "outlet": "North",
      "order": "O100",
      "event": "S100",
      "revision": 1,
      "type": "sale",
      "minorUnits": 10000
    },
    {
      "intake": "I03",
      "transport": "T03",
      "source": "POS-A",
      "outlet": "North",
      "order": "O100",
      "event": "R100",
      "revision": 1,
      "type": "refund",
      "minorUnits": -1500
    },
    {
      "intake": "I04",
      "transport": "T04",
      "source": "POS-A",
      "outlet": "North",
      "order": "O100",
      "event": "R100",
      "revision": 2,
      "type": "refund",
      "minorUnits": -1800
    },
    {
      "intake": "I05",
      "transport": "T05",
      "source": "BANK-B",
      "outlet": "North",
      "order": "O100",
      "event": "P100",
      "revision": 1,
      "type": "payment",
      "minorUnits": 8200
    },
    {
      "intake": "I06",
      "transport": "T06",
      "source": "POS-A",
      "outlet": "South",
      "order": "O100",
      "event": "S100",
      "revision": 1,
      "type": "sale",
      "minorUnits": 6500
    },
    {
      "intake": "I07",
      "transport": "T07",
      "source": "POS-A",
      "outlet": "South",
      "order": "O100",
      "event": "R100",
      "revision": 1,
      "type": "refund",
      "minorUnits": -500
    },
    {
      "intake": "I08",
      "transport": "T08",
      "source": "POS-A",
      "outlet": "North",
      "order": "O101",
      "event": "S101",
      "revision": 1,
      "type": "sale",
      "minorUnits": 4000
    },
    {
      "intake": "I09",
      "transport": "T09",
      "source": "POS-A",
      "outlet": "North",
      "order": "O101",
      "event": "C101",
      "revision": 1,
      "type": "cancellation",
      "minorUnits": -4000
    }
  ],
  "expected": {
    "balances": {
      "North/O100": 8200,
      "South/O100": 6000,
      "North/O101": 0
    },
    "groupBalance": 14200,
    "duplicates": [
      "I02"
    ],
    "rawRows": 9,
    "candidateVersions": 8,
    "currentEvents": 7,
    "currentBalanceContributors": 6,
    "superseded": [
      "I03"
    ],
    "paymentObservation": 8200
  },
  "tests": [
    {
      "change": "Replay all rows",
      "expectedBalances": {
        "North/O100": 8200,
        "South/O100": 6000,
        "North/O101": 0
      }
    },
    {
      "change": "Add R100 revision3 amount -2100",
      "expectedNorthO100": 7900
    },
    {
      "change": "Add conflicting S100 revision1 amount10200",
      "expected": "quarantine conflict; North/O100 blocked"
    },
    {
      "change": "Add independent refund R101 amount-700",
      "expectedNorthO100": 7500
    }
  ]
}