{
  "tests": [
    {
      "description": "Valid read preference options are parsed correctly",
      "uri": "mongodb://example.com/?readPreference=primaryPreferred&readPreferenceTags=dc:ny,rack:1&maxStalenessSeconds=120&readPreferenceTags=dc:ny",
      "valid": true,
      "warning": false,
      "hosts": null,
      "auth": null,
      "options": {
        "readPreference": "primaryPreferred",
        "readPreferenceTags": [
          {
            "dc": "ny",
            "rack": "1"
          },
          {
            "dc": "ny"
          }
        ],
        "maxStalenessSeconds": 120
      }
    },
    {
      "description": "Single readPreferenceTags is parsed as array of size one",
      "uri": "mongodb://example.com/?readPreference=secondary&readPreferenceTags=dc:ny",
      "valid": true,
      "warning": false,
      "hosts": null,
      "auth": null,
      "options": {
        "readPreferenceTags": [
          {
            "dc": "ny"
          }
        ]
      }
    },
    {
      "description": "Read preference tags are case sensitive",
      "uri": "mongodb://example.com/?readPreference=secondary&readPreferenceTags=dc:NY",
      "valid": true,
      "warning": false,
      "hosts": null,
      "auth": null,
      "options": {
        "readPreferenceTags": [
          {
            "dc": "NY"
          }
        ]
      }
    },
    {
      "description": "Invalid readPreferenceTags causes a warning",
      "uri": "mongodb://example.com/?readPreferenceTags=invalid",
      "valid": true,
      "warning": true,
      "hosts": null,
      "auth": null,
      "options": null
    },
    {
      "description": "Non-numeric maxStalenessSeconds causes a warning",
      "uri": "mongodb://example.com/?maxStalenessSeconds=invalid",
      "valid": true,
      "warning": true,
      "hosts": null,
      "auth": null,
      "options": null
    },
    {
      "description": "Too low maxStalenessSeconds causes a warning",
      "uri": "mongodb://example.com/?maxStalenessSeconds=-2",
      "valid": true,
      "warning": true,
      "hosts": null,
      "auth": null,
      "options": null
    }
  ]
}
