Merge "Bug 8535: Fix IPv6 OXMHeader Mask issue"
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / connection / listener / HandshakeListenerImplTest.java
index 73d2a36709af1ed7e86a333695a473bf180c9917..d2ad7ff60767161f1b90f520baae1fe9b84480a1 100644 (file)
@@ -74,10 +74,11 @@ public class HandshakeListenerImplTest {
 
     @Test
     public void testOnHandshakeSuccessfull() throws Exception {
-        handshakeListener.onHandshakeSuccessfull(features, version);
+        handshakeListener.onHandshakeSuccessful(features, version);
         Mockito.verify(connectionContextSpy).changeStateToWorking();
         Mockito.verify(connectionContextSpy).setFeatures(Matchers.any(FeaturesReply.class));
         Mockito.verify(connectionContextSpy).setNodeId(nodeIdCaptor.capture());
+        Mockito.verify(connectionContextSpy).handshakeSuccessful();
         Mockito.verify(deviceConnectedHandler).deviceConnected(connectionContextSpy);
         Mockito.verify(handshakeContext).close();
 
@@ -95,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);