Merge "Bug 6088 - Threads problem on gathering statistics"
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / connection / listener / HandshakeListenerImplTest.java
index 73d2a36709af1ed7e86a333695a473bf180c9917..b20a4f999e6b915a71e22e681c486e91844afa9a 100644 (file)
@@ -63,6 +63,7 @@ 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);
     }
@@ -74,10 +75,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();