Bump odlparent dependency to 2.0.0
[bgpcep.git] / bgp / peer-acceptor / src / test / java / org / opendaylight / protocol / bgp / peer / acceptor / BGPPeerAcceptorImplTest.java
index 98f81c40086e68762b93ca57cc914b33b93b5edf..99a767304b155a6f7b63e6d4788e4dc5bbdbae32 100644 (file)
@@ -7,7 +7,8 @@
  */
 package org.opendaylight.protocol.bgp.peer.acceptor;
 
-import static org.opendaylight.protocol.bgp.rib.impl.CheckUtil.waitFutureSuccess;
+import static org.opendaylight.protocol.bgp.rib.impl.CheckUtil.checkIdleState;
+import static org.opendaylight.protocol.util.CheckUtil.waitFutureSuccess;
 
 import com.google.common.collect.Sets;
 import io.netty.util.concurrent.Future;
@@ -27,15 +28,15 @@ public class BGPPeerAcceptorImplTest extends AbstractBGPDispatcherTest {
     @Test
     public void testBGPPeerAcceptorImpl() throws Exception {
         final InetSocketAddress inetServerAddress = InetSocketAddressUtil.getRandomLoopbackInetSocketAddress();
-        final IpAddress serverIpAddress = new IpAddress(new Ipv4Address(InetSocketAddressUtil.toHostAndPort(inetServerAddress).getHostText()));
+        final IpAddress serverIpAddress = new IpAddress(new Ipv4Address(InetSocketAddressUtil.toHostAndPort(inetServerAddress).getHost()));
         final PortNumber portNumber = new PortNumber(InetSocketAddressUtil.toHostAndPort(inetServerAddress).getPort());
         this.registry.addPeer(serverIpAddress, this.serverListener, createPreferences(inetServerAddress));
 
         final BGPPeerAcceptorImpl bgpPeerAcceptor = new BGPPeerAcceptorImpl(serverIpAddress, portNumber,
-            this.registry, this.serverDispatcher);
+            this.serverDispatcher);
         bgpPeerAcceptor.start();
         final Future<BGPSessionImpl> futureClient = this.clientDispatcher
-            .createClient(this.clientAddress, inetServerAddress, this.registry, 2, true);
+            .createClient(this.clientAddress, inetServerAddress, 2, true);
         waitFutureSuccess(futureClient);
         final BGPSessionImpl session = futureClient.get();
         Assert.assertEquals(State.UP, this.clientListener.getState());
@@ -46,4 +47,4 @@ public class BGPPeerAcceptorImplTest extends AbstractBGPDispatcherTest {
 
         bgpPeerAcceptor.close();
     }
-}
\ No newline at end of file
+}