- try (final BGPPeer testingPeer = new BGPPeer("testingPeer", getRib(), PeerRole.Ibgp, null)) {
- testingPeer.instantiateServiceInstance();
- testingPeer.onSessionUp(this.session);
- assertEquals(3, this.routes.size());
- assertEquals(1, testingPeer.getBgpPeerState().getSessionEstablishedCount().getValue().intValue());
- final List<RouteTable> routeTables = testingPeer.getBgpPeerState().getRouteTable();
- assertEquals(1, routeTables.size());
- final RouteTable routeTable = routeTables.get(0);
- assertEquals(AFI_QNAME.toString(), routeTable.getAfi().getqNameOfIdentity());
- assertEquals(SAFI_QNAME.toString(), routeTable.getSafi().getqNameOfIdentity());
- assertNotNull(testingPeer.getBgpSessionState());
- }
+ final BGPPeer testingPeer = new BGPPeer("testingPeer", getRib(), PeerRole.Ibgp, null);
+ testingPeer.instantiateServiceInstance();
+ testingPeer.onSessionUp(this.session);
+ assertEquals(3, this.routes.size());
+ assertEquals(1, testingPeer.getBgpPeerState().getSessionEstablishedCount().getValue().intValue());
+ final List<RouteTable> routeTables = testingPeer.getBgpPeerState().getRouteTable();
+ assertEquals(1, routeTables.size());
+ final RouteTable routeTable = routeTables.get(0);
+ assertEquals(AFI_QNAME.toString(), routeTable.getAfi().getqNameOfIdentity());
+ assertEquals(SAFI_QNAME.toString(), routeTable.getSafi().getqNameOfIdentity());
+ assertNotNull(testingPeer.getBgpSessionState());