Fix BGP operational state
[bgpcep.git] / bgp / rib-impl / src / test / java / org / opendaylight / protocol / bgp / rib / impl / config / BgpDeployerTest.java
index e6086e9fb4a01018585f762fb07ee10fccb7c686..0459e0a7479ab284ba9bb0b9548a55d310ac71a9 100644 (file)
@@ -44,7 +44,9 @@ import org.opendaylight.protocol.bgp.rib.impl.DefaultRibPoliciesMockTest;
 import org.opendaylight.protocol.bgp.rib.impl.protocol.BGPReconnectPromise;
 import org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher;
 import org.opendaylight.protocol.bgp.rib.impl.spi.CodecsRegistry;
+import org.opendaylight.protocol.bgp.rib.impl.state.BGPStateCollector;
 import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionConsumerContext;
+import org.opendaylight.protocol.bgp.rib.spi.state.BGPStateProviderRegistry;
 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.bgp.top.Bgp;
 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.bgp.top.bgp.Global;
 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.bgp.top.bgp.Neighbors;
@@ -92,6 +94,7 @@ public class BgpDeployerTest extends DefaultRibPoliciesMockTest {
     @Mock
     private ClusterSingletonServiceProvider singletonServiceProvider;
 
+    private final BGPStateProviderRegistry stateProviderRegistry = new BGPStateCollector();
     private DefaultBgpDeployer deployer;
     private BGPClusterSingletonService spiedBgpSingletonService;
     private CountDownLatch bgpSingletonObtainedLatch;
@@ -112,11 +115,10 @@ public class BgpDeployerTest extends DefaultRibPoliciesMockTest {
         final Future future = mock(BGPReconnectPromise.class);
         doReturn(true).when(future).cancel(true);
         doReturn(future).when(this.dispatcher).createReconnectingClient(any(), any(), anyInt(), any());
-
         this.deployer = spy(new DefaultBgpDeployer(NETWORK_INSTANCE_NAME, this.singletonServiceProvider,
                 this.rpcRegistry, this.extensionContext, this.dispatcher,
                 new DefaultBGPRibRoutingPolicyFactory(getDataBroker(), new StatementRegistry()),
-                this.codecsRegistry, getDomBroker(), getDataBroker(), this.tableTypeRegistry));
+                this.codecsRegistry, getDomBroker(), getDataBroker(), this.tableTypeRegistry, stateProviderRegistry));
         this.bgpSingletonObtainedLatch = new CountDownLatch(1);
         doAnswer(invocationOnMock -> {
                 final BGPClusterSingletonService real =