Fix DeviceFlowRegistry performance regression
[openflowplugin.git] / openflowplugin-impl / src / test / java / org / opendaylight / openflowplugin / impl / util / MdSalRegistrationUtilsTest.java
index a87c56300a8f895fd3a050cc1753b437d8eb115a..61f994824b4b75094d552d6385157c07d5df0af9 100644 (file)
@@ -1,12 +1,9 @@
 /*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
  *
- *  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
- *  *
- *  * This program and the accompanying materials are made available under the
- *  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- *  * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 
 package org.opendaylight.openflowplugin.impl.util;
@@ -27,8 +24,9 @@ import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceState;
 import org.opendaylight.openflowplugin.api.openflow.rpc.RpcContext;
 import org.opendaylight.openflowplugin.extension.api.core.extension.ExtensionConverterProvider;
+import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManager;
+import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorManagerFactory;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FeaturesReply;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.role.service.rev150727.OfpRole;
 import org.opendaylight.yangtools.yang.binding.RpcService;
 
 public class MdSalRegistrationUtilsTest {
@@ -37,7 +35,7 @@ public class MdSalRegistrationUtilsTest {
      * Number of currently registrated services (can be changed)
      * (RpcContext, DeviceContext)}
      */
-    private static final int NUMBER_OF_RPC_SERVICE_REGISTRATION = 13;
+    private static final int NUMBER_OF_RPC_SERVICE_REGISTRATION = 14;
 
     @Test
     public void registerServiceTest() {
@@ -61,7 +59,8 @@ public class MdSalRegistrationUtilsTest {
         when(mockedDeviceContext.getPrimaryConnectionContext()).thenReturn(mockedConnectionContext);
 
         final ExtensionConverterProvider extensionConverterProvider = mock(ExtensionConverterProvider.class);
-        MdSalRegistrationUtils.registerServices(mockedRpcContext, mockedDeviceContext, extensionConverterProvider);
+        final ConvertorManager convertorManager = ConvertorManagerFactory.createDefaultManager();
+        MdSalRegistrationUtils.registerServices(mockedRpcContext, mockedDeviceContext, extensionConverterProvider, convertorManager);
         verify(mockedRpcContext, times(NUMBER_OF_RPC_SERVICE_REGISTRATION)).registerRpcServiceImplementation(
                 Matchers.<Class<RpcService>> any(), any(RpcService.class));
     }