BUG-7706: Fix ServiceUnavailableException
[bgpcep.git] / bgp / rib-impl / src / test / java / org / opendaylight / protocol / bgp / rib / impl / config / AbstractConfig.java
index 2c3d32f11caf2583ae1caec19ea901fc3729c50e..2215b66009738bde3ca72a1144f97e5c79de6108 100644 (file)
@@ -147,7 +147,7 @@ class AbstractConfig {
         Mockito.doReturn(new BgpId("127.0.0.1")).when(this.rib).getBgpIdentifier();
         Mockito.doReturn(true).when(this.future).cancel(true);
         Mockito.doReturn(this.future).when(this.dispatcher)
-            .createReconnectingClient(any(InetSocketAddress.class), any(BGPPeerRegistry.class), anyInt(), any(Optional.class));
+            .createReconnectingClient(any(InetSocketAddress.class), anyInt(), any(Optional.class));
         Mockito.doReturn(this.dispatcher).when(this.rib).getDispatcher();
 
         Mockito.doReturn(java.util.Optional.of(new BgpTableTypeImpl(Ipv4AddressFamily.class, UnicastSubsequentAddressFamily.class)))
@@ -161,5 +161,6 @@ class AbstractConfig {
         Mockito.doNothing().when(this.bgpPeerRegistry).removePeer(any(IpAddress.class));
         Mockito.doReturn("registry").when(this.bgpPeerRegistry).toString();
         Mockito.doNothing().when(this.listener).close();
+        Mockito.doReturn(this.bgpPeerRegistry).when(this.dispatcher).getBGPPeerRegistry();
     }
 }