Merge "Bug 8535: Fix IPv6 OXMHeader Mask issue"
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / connection / listener / HandshakeListenerImplTest.java
index b20a4f999e6b915a71e22e681c486e91844afa9a..d2ad7ff60767161f1b90f520baae1fe9b84480a1 100644 (file)
@@ -63,7 +63,6 @@ public class HandshakeListenerImplTest {
         connectionContextSpy = Mockito.spy(new ConnectionContextImpl(connectionAdapter));
         Mockito.when(connectionContextSpy.getConnectionAdapter()).thenReturn(connectionAdapter);
         Mockito.when(features.getDatapathId()).thenReturn(BigInteger.TEN);
-        Mockito.doNothing().when(connectionContextSpy).handshakeSuccessful();
         handshakeListener = new HandshakeListenerImpl(connectionContextSpy, deviceConnectedHandler);
         handshakeListener.setHandshakeContext(handshakeContext);
     }
@@ -97,6 +96,7 @@ public class HandshakeListenerImplTest {
     @Test
     public void testOnHandshakeFailure2() throws Exception {
         Mockito.when(connectionAdapter.getRemoteAddress()).thenReturn(InetSocketAddress.createUnresolved("ut-ofp.example.org", 4242));
+        connectionContextSpy.setNodeId(new NodeId("openflow:1"));
         handshakeListener.onHandshakeFailure();
         Mockito.verify(handshakeContext).close();
         Mockito.verify(connectionContextSpy).closeConnection(false);