[
  {
    "comment": "list drivers",
    "request": { "uri": "me/drivers" },
    "response": {
      "store": "myDrivers",
      "check": [
        {"condition": "json.length == 2"},
        {"condition": "_find(json, function (d) { return d.getName() == 'UserBlockerRuleDriver'; }) != null"},
        {"condition": "_find(json, function (d) { return d.getName() == 'TrafficAnalyticsRuleDriver'; }) != null"}
      ]
    }
  },

  {
    "comment": "list all drivers",
    "request": { "uri": "drivers" },
    "response": {
      "store": "allDrivers",
      "check": [
        {"condition": "json.length == 2"},
        {"condition": "_find(json, function (d) { return d.getName() == 'UserBlockerRuleDriver'; }) != null"},
        {"condition": "_find(json, function (d) { return d.getName() == 'TrafficAnalyticsRuleDriver'; }) != null"}
      ]
    }
  },

  {
    "comment": "view a single driver",
    "request": { "uri": "me/drivers/{{find myDrivers 'name' 'UserBlockerRuleDriver' 'driverClass'}}" },
    "response": {
      "check": [
        {"condition": "json.getName() == 'UserBlockerRuleDriver'"}
      ]
    }
  },

  {
    "comment": "view a single public driver",
    "request": { "uri": "drivers/{{find allDrivers 'name' 'TrafficAnalyticsRuleDriver' 'uuid'}}" },
    "response": {
      "check": [
        {"condition": "json.getName() == 'TrafficAnalyticsRuleDriver'"}
      ]
    }
  },

  {
    "comment": "list data for a user driver",
    "request": { "uri": "me/apps/UserBlocker/data" },
    "response": {
      "check": [
        {"condition": "json.length == 2"}
      ]
    }
  },

  {
    "comment": "list data for an app that uses a rule with this driver",
    "request": { "uri": "apps/UserBlocker/data" },
    "response": {
      "check": [
        {"condition": "json.length == 2"}
      ]
    }
  }

]