{
  "asn": 16,
  "networks": [{
    "network": "192.168.0.0",
    "netmask": "255.255.255.0",
    "type": "cust",
    "AS": 1
  }, {
    "network": "172.168.0.0",
    "netmask": "255.255.0.0",
    "type": "peer",
    "AS": 2
  }, {
    "network": "10.0.0.0",
    "netmask": "255.0.0.0",
    "type": "peer",
    "AS": 3
  }],
  "messages": [{
    "type": "msg",
    "msg": {
      "type": "update",
      "src": "192.168.0.2",
      "dst": "192.168.0.1",
      "msg": {
        "network": "192.168.1.0",
        "netmask": "255.255.255.0",
        "localpref": 100,
        "ASPath": [1],
        "origin": "EGP",
        "selfOrigin": true
      }
    },
    "expected": {
      "192.168.0.2": [],
      "172.168.0.2": [{
        "msg": {
          "netmask": "255.255.255.0",
          "ASPath": [16, 1],
          "network": "192.168.1.0"
        },
        "src": "172.168.0.1",
        "dst": "172.168.0.2",
        "type": "update"
      }],
      "10.0.0.2": [{
        "msg": {
          "netmask": "255.255.255.0",
          "ASPath": [16, 1],
          "network": "192.168.1.0"
        },
        "src": "10.0.0.1",
        "dst": "10.0.0.2",
        "type": "update"
      }]
    }
  }, {
    "type": "msg",
    "msg": {
      "type": "update",
      "src": "172.168.0.2",
      "dst": "172.168.0.1",
      "msg": {
        "network": "172.169.0.0",
        "netmask": "255.255.0.0",
        "localpref": 100,
        "ASPath": [2],
        "origin": "EGP",
        "selfOrigin": true
      }
    },
    "expected": {
      "192.168.0.2": [{
        "msg": {
          "netmask": "255.255.0.0",
          "ASPath": [16, 2],
          "network": "172.169.0.0"
        },
        "src": "192.168.0.1",
        "dst": "192.168.0.2",
        "type": "update"
      }],
      "172.168.0.2": [],
      "10.0.0.2": []
    }
  }, {
    "type": "msg",
    "msg": {
      "type": "update",
      "src": "10.0.0.2",
      "dst": "10.0.0.1",
      "msg": {
        "network": "11.0.0.0",
        "netmask": "255.0.0.0",
        "localpref": 100,
        "ASPath": [3],
        "origin": "EGP",
        "selfOrigin": true
      }
    },
    "expected": {
      "192.168.0.2": [{
        "msg": {
          "netmask": "255.0.0.0",
          "ASPath": [16, 3],
          "network": "11.0.0.0"
        },
        "src": "192.168.0.1",
        "dst": "192.168.0.2",
        "type": "update"
      }],
      "172.168.0.2": [],
      "10.0.0.2": []
    }
  }, {
    "type": "data",
    "expected": {
      "192.168.0.2": 2,
      "172.168.0.2": 1,
      "10.0.0.2": 1
    }
  }, {
    "type": "dump",
    "expected": [{
      "origin": "EGP",
      "localpref": 100,
      "network": "172.169.0.0",
      "ASPath": [2],
      "netmask": "255.255.0.0",
      "peer": "172.168.0.2",
      "selfOrigin": true
    }, {
      "origin": "EGP",
      "localpref": 100,
      "network": "11.0.0.0",
      "ASPath": [3],
      "netmask": "255.0.0.0",
      "peer": "10.0.0.2",
      "selfOrigin": true
    }, {
      "origin": "EGP",
      "localpref": 100,
      "network": "192.168.1.0",
      "ASPath": [1],
      "netmask": "255.255.255.0",
      "peer": "192.168.0.2",
      "selfOrigin": true
    }]
  }]
}
