{
  "asn": 14,
  "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": "cust",
    "AS": 2
  }],
  "messages": [{
    "type": "msg",
    "msg": {
      "type": "update",
      "src": "192.168.0.2",
      "dst": "192.168.0.1",
      "msg": {
        "network": "192.168.0.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": [14, 1],
          "network": "192.168.0.0"
        },
        "src": "172.168.0.1",
        "dst": "172.168.0.2",
        "type": "update"
      }]
    }
  }, {
    "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": [14, 1],
          "network": "192.168.1.0"
        },
        "src": "172.168.0.1",
        "dst": "172.168.0.2",
        "type": "update"
      }]
    }
  }, {
    "type": "msg",
    "msg": {
      "type": "update",
      "src": "192.168.0.2",
      "dst": "192.168.0.1",
      "msg": {
        "network": "192.168.2.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": [14, 1],
          "network": "192.168.2.0"
        },
        "src": "172.168.0.1",
        "dst": "172.168.0.2",
        "type": "update"
      }]
    }
  }, {
    "type": "msg",
    "msg": {
      "type": "update",
      "src": "192.168.0.2",
      "dst": "192.168.0.1",
      "msg": {
        "network": "192.168.3.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": [14, 1],
          "network": "192.168.3.0"
        },
        "src": "172.168.0.1",
        "dst": "172.168.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": [14, 2],
          "network": "172.169.0.0"
        },
        "src": "192.168.0.1",
        "dst": "192.168.0.2",
        "type": "update"
      }],
      "172.168.0.2": []
    }
  }, {
    "type": "data",
    "expected": {
      "192.168.0.2": 4,
      "172.168.0.2": 4
    }
  }, {
    "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": "192.168.0.0",
      "ASPath": [1],
      "netmask": "255.255.252.0",
      "peer": "192.168.0.2",
      "selfOrigin": true
    }]
  }, {
    "type": "msg",
    "msg": {
      "type": "withdraw",
      "src": "192.168.0.2",
      "dst": "192.168.0.1",
      "msg": [{
        "network": "192.168.2.0",
        "netmask": "255.255.255.0"
      }]
    },
    "expected": {
      "192.168.0.2": [],
      "172.168.0.2": [{
        "msg": [{
          "netmask": "255.255.255.0",
          "network": "192.168.2.0"
        }],
        "src": "172.168.0.1",
        "dst": "172.168.0.2",
        "type": "withdraw"
      }]
    }
  }, {
    "type": "data",
    "expected": {
      "192.168.0.2": 3,
      "172.168.0.2": 3
    }
  }, {
    "type": "dump",
    "expected": [{
      "origin": "EGP",
      "localpref": 100,
      "network": "192.168.0.0",
      "ASPath": [1],
      "netmask": "255.255.254.0",
      "peer": "192.168.0.2",
      "selfOrigin": true
    }, {
      "origin": "EGP",
      "localpref": 100,
      "network": "192.168.3.0",
      "ASPath": [1],
      "netmask": "255.255.255.0",
      "peer": "192.168.0.2",
      "selfOrigin": true
    }, {
      "origin": "EGP",
      "localpref": 100,
      "network": "172.169.0.0",
      "ASPath": [2],
      "netmask": "255.255.0.0",
      "peer": "172.168.0.2",
      "selfOrigin": true
    }]
  }, {
    "type": "msg",
    "msg": {
      "type": "withdraw",
      "src": "192.168.0.2",
      "dst": "192.168.0.1",
      "msg": [{
        "network": "192.168.0.0",
        "netmask": "255.255.255.0"
      }]
    },
    "expected": {
      "192.168.0.2": [],
      "172.168.0.2": [{
        "msg": [{
          "netmask": "255.255.255.0",
          "network": "192.168.0.0"
        }],
        "src": "172.168.0.1",
        "dst": "172.168.0.2",
        "type": "withdraw"
      }]
    }
  }, {
    "type": "data",
    "expected": {
      "192.168.0.2": 2,
      "172.168.0.2": 2
    }
  }, {
    "type": "dump",
    "expected": [{
      "origin": "EGP",
      "localpref": 100,
      "network": "192.168.3.0",
      "ASPath": [1],
      "netmask": "255.255.255.0",
      "peer": "192.168.0.2",
      "selfOrigin": true
    }, {
      "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": "192.168.1.0",
      "ASPath": [1],
      "netmask": "255.255.255.0",
      "peer": "192.168.0.2",
      "selfOrigin": true
    }]
  }]
}
