{
  "asn": 9,
  "networks": [{
    "network": "192.0.0.0",
    "netmask": "255.0.0.0",
    "type": "cust",
    "AS": 1
  }, {
    "network": "192.168.0.0",
    "netmask": "255.255.0.0",
    "type": "cust",
    "AS": 2
  }, {
    "network": "192.168.12.0",
    "netmask": "255.255.255.0",
    "type": "cust",
    "AS": 3
  }, {
    "network": "172.77.0.0",
    "netmask": "255.255.0.0",
    "type": "cust",
    "AS": 4
  }],
  "messages": [{
    "type": "msg",
    "msg": {
      "type": "update",
      "src": "172.77.0.2",
      "dst": "172.77.0.1",
      "msg": {
        "network": "172.77.0.0",
        "netmask": "255.255.0.0",
        "localpref": 100,
        "ASPath": [4],
        "origin": "EGP",
        "selfOrigin": true
      }
    },
    "expected": {
      "192.0.0.2": [{
        "msg": {
          "netmask": "255.255.0.0",
          "ASPath": [9, 4],
          "network": "172.77.0.0"
        },
        "src": "192.0.0.1",
        "dst": "192.0.0.2",
        "type": "update"
      }],
      "192.168.0.2": [{
        "msg": {
          "netmask": "255.255.0.0",
          "ASPath": [9, 4],
          "network": "172.77.0.0"
        },
        "src": "192.168.0.1",
        "dst": "192.168.0.2",
        "type": "update"
      }],
      "192.168.12.2": [{
        "msg": {
          "netmask": "255.255.0.0",
          "ASPath": [9, 4],
          "network": "172.77.0.0"
        },
        "src": "192.168.12.1",
        "dst": "192.168.12.2",
        "type": "update"
      }],
      "172.77.0.2": []
    }
  }, {
    "type": "msg",
    "msg": {
      "type": "update",
      "src": "192.0.0.2",
      "dst": "192.0.0.1",
      "msg": {
        "network": "192.0.0.0",
        "netmask": "255.0.0.0",
        "localpref": 100,
        "ASPath": [1],
        "origin": "EGP",
        "selfOrigin": true
      }
    },
    "expected": {
      "192.0.0.2": [],
      "192.168.0.2": [{
        "msg": {
          "netmask": "255.0.0.0",
          "ASPath": [9, 1],
          "network": "192.0.0.0"
        },
        "src": "192.168.0.1",
        "dst": "192.168.0.2",
        "type": "update"
      }],
      "192.168.12.2": [{
        "msg": {
          "netmask": "255.0.0.0",
          "ASPath": [9, 1],
          "network": "192.0.0.0"
        },
        "src": "192.168.12.1",
        "dst": "192.168.12.2",
        "type": "update"
      }],
      "172.77.0.2": [{
        "msg": {
          "netmask": "255.0.0.0",
          "ASPath": [9, 1],
          "network": "192.0.0.0"
        },
        "src": "172.77.0.1",
        "dst": "172.77.0.2",
        "type": "update"
      }]
    }
  }, {
    "type": "msg",
    "msg": {
      "type": "update",
      "src": "192.168.12.2",
      "dst": "192.168.12.1",
      "msg": {
        "network": "192.168.12.0",
        "netmask": "255.255.255.0",
        "localpref": 100,
        "ASPath": [3],
        "origin": "EGP",
        "selfOrigin": true
      }
    },
    "expected": {
      "192.0.0.2": [{
        "msg": {
          "netmask": "255.255.255.0",
          "ASPath": [9, 3],
          "network": "192.168.12.0"
        },
        "src": "192.0.0.1",
        "dst": "192.0.0.2",
        "type": "update"
      }],
      "192.168.0.2": [{
        "msg": {
          "netmask": "255.255.255.0",
          "ASPath": [9, 3],
          "network": "192.168.12.0"
        },
        "src": "192.168.0.1",
        "dst": "192.168.0.2",
        "type": "update"
      }],
      "192.168.12.2": [],
      "172.77.0.2": [{
        "msg": {
          "netmask": "255.255.255.0",
          "ASPath": [9, 3],
          "network": "192.168.12.0"
        },
        "src": "172.77.0.1",
        "dst": "172.77.0.2",
        "type": "update"
      }]
    }
  }, {
    "type": "msg",
    "msg": {
      "type": "update",
      "src": "192.168.0.2",
      "dst": "192.168.0.1",
      "msg": {
        "network": "192.168.0.0",
        "netmask": "255.255.0.0",
        "localpref": 100,
        "ASPath": [2],
        "origin": "EGP",
        "selfOrigin": true
      }
    },
    "expected": {
      "192.0.0.2": [{
        "msg": {
          "netmask": "255.255.0.0",
          "ASPath": [9, 2],
          "network": "192.168.0.0"
        },
        "src": "192.0.0.1",
        "dst": "192.0.0.2",
        "type": "update"
      }],
      "192.168.0.2": [],
      "192.168.12.2": [{
        "msg": {
          "netmask": "255.255.0.0",
          "ASPath": [9, 2],
          "network": "192.168.0.0"
        },
        "src": "192.168.12.1",
        "dst": "192.168.12.2",
        "type": "update"
      }],
      "172.77.0.2": [{
        "msg": {
          "netmask": "255.255.0.0",
          "ASPath": [9, 2],
          "network": "192.168.0.0"
        },
        "src": "172.77.0.1",
        "dst": "172.77.0.2",
        "type": "update"
      }]
    }
  }, {
    "type": "data",
    "expected": {
      "192.0.0.2": 3,
      "192.168.0.2": 3,
      "192.168.12.2": 3,
      "172.77.0.2": 3
    }
  }, {
    "type": "data",
    "expected": {
      "192.0.0.2": 3,
      "192.168.0.2": 3,
      "192.168.12.2": 3,
      "172.77.0.2": 3
    }
  }, {
    "type": "data",
    "expected": {
      "192.0.0.2": 3,
      "192.168.0.2": 3,
      "192.168.12.2": 3,
      "172.77.0.2": 3
    }
  }, {
    "type": "dump",
    "expected": [{
      "origin": "EGP",
      "localpref": 100,
      "network": "192.168.0.0",
      "ASPath": [2],
      "netmask": "255.255.0.0",
      "peer": "192.168.0.2",
      "selfOrigin": true
    }, {
      "origin": "EGP",
      "localpref": 100,
      "network": "192.0.0.0",
      "ASPath": [1],
      "netmask": "255.0.0.0",
      "peer": "192.0.0.2",
      "selfOrigin": true
    }, {
      "origin": "EGP",
      "localpref": 100,
      "network": "192.168.12.0",
      "ASPath": [3],
      "netmask": "255.255.255.0",
      "peer": "192.168.12.2",
      "selfOrigin": true
    }, {
      "origin": "EGP",
      "localpref": 100,
      "network": "172.77.0.0",
      "ASPath": [4],
      "netmask": "255.255.0.0",
      "peer": "172.77.0.2",
      "selfOrigin": true
    }]
  }]
}
