[
  {
    "comment": "fake a request to website foo.example.com/bar",
    "include": "fake_filter",
    "params": {
      "fqdn": "foo.example.com",
      "uri": "/bar",
      "jsCheck": "json.getMatchers().length === 0"
    }
  },

  {
    "comment": "fake a second request to foo.example.com/baz",
    "include": "fake_filter",
    "params": {
      "fqdn": "foo.example.com",
      "uri": "/baz",
      "jsCheck": "json.getMatchers().length === 0"
    }
  },

  {
    "comment": "fake a third request to bar.example.com/qux",
    "include": "fake_filter",
    "params": {
      "fqdn": "bar.example.com",
      "uri": "/qux",
      "jsCheck": "json.getMatchers().length === 0"
    }
  },

  {
    "comment": "get AppData for analytics app",
    "request": { "uri": "me/apps/TrafficAnalytics/data" },
    "response": {
      "check": [
        {"condition": "json.length === 8"},
        {"condition": "_find(json, function (d) { return d.getKey().startsWith('foo.example.com@hourly') }) != null"},
        {"condition": "_find(json, function (d) { return d.getKey().startsWith('foo.example.com@hourly') }).getData() == 2"},
        {"condition": "_find(json, function (d) { return d.getKey().startsWith('bar.example.com@hourly') }) != null"},
        {"condition": "_find(json, function (d) { return d.getKey().startsWith('bar.example.com@hourly') }).getData() == 1"},
        {"condition": "_find(json, function (d) { return d.getKey().startsWith('foo.example.com@daily') }) != null"},
        {"condition": "_find(json, function (d) { return d.getKey().startsWith('foo.example.com@daily') }).getData() == 2"},
        {"condition": "_find(json, function (d) { return d.getKey().startsWith('bar.example.com@daily') }) != null"},
        {"condition": "_find(json, function (d) { return d.getKey().startsWith('bar.example.com@daily') }).getData() == 1"}
      ]
    }
  }
]