{
  "input": {
    "type": "track",
    "userId": "user-id",
    "event": "my-event",
    "timestamp": "2014",
    "properties": {
      "searchEngine": "google",
      "username": "jd",
      "email": "jd@example.com",
      "referrer": "someone",
      "query": "analytics"
    },
    "context": {
      "ip": "10.0.0.1"
    }
  },
  "output": {
    "event": "my-event",
    "properties": {
      "$search_engine": "google",
      "$referrer": "someone",
      "$username": "jd",
      "email": "jd@example.com",
      "mp_name_tag": "user-id",
      "mp_lib": "Segment: unknown",
      "ip": "10.0.0.1",
      "time": 1388534400,
      "id": "user-id",
      "token": "50912cd33fd82225ab5ae1c563bd5a7e",
      "distinct_id": "user-id"
    }
  }
}

{
  "input": {
    "type": "track",
    "userId": "user-id",
    "event": "my-event",
    "timestamp": "2014",
    "properties": {
      "searchEngine": "google",
      "username": "jd",
      "email": "jd@example.com",
      "referrer": "someone",
      "query": "analytics"
    },
    "context": {
      "ip": "10.0.0.1",
      "userAgent": "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.11 (KHTML, like Gecko) Version/7.1.0.7 Safari/534.11"
    }
  },
  "output": {
    "event": "my-event",
    "properties": {
      "$search_engine": "google",
      "$referrer": "someone",
      "$browser": "Safari",
      "$os": "RIM Tablet OS",
      "$username": "jd",
      "email": "jd@example.com",
      "mp_name_tag": "user-id",
      "mp_lib": "Segment: unknown",
      "ip": "10.0.0.1",
      "time": 1388534400,
      "id": "user-id",
      "token": "50912cd33fd82225ab5ae1c563bd5a7e",
      "distinct_id": "user-id"
    }
  }
}

Add test to verify os and browser are picked correctly from UserAgent
Add test to verify os and browser are picked correctly from UserAgent
