Bump upstream dependencies to latest Ca versions
[transportpce.git] / nbinotifications / src / test / java / org / opendaylight / transportpce / nbinotifications / impl / NbiNotificationsProviderTest.java
index bbf2e62e063d8ebbcda1996ead49050c8853a471..c5b2237729cd35b3f55856bac2cfd916e4985d5d 100644 (file)
@@ -11,7 +11,7 @@ import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 
-import java.util.Arrays;
+import com.google.common.collect.ClassToInstanceMap;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.mockito.Mock;
@@ -20,15 +20,14 @@ import org.opendaylight.mdsal.binding.api.NotificationService;
 import org.opendaylight.mdsal.binding.api.RpcProviderService;
 import org.opendaylight.transportpce.common.network.NetworkTransactionImpl;
 import org.opendaylight.transportpce.common.network.NetworkTransactionService;
-import org.opendaylight.transportpce.nbinotifications.listener.NbiNotificationsListenerImpl;
 import org.opendaylight.transportpce.test.AbstractTest;
 
+
 public class NbiNotificationsProviderTest  extends AbstractTest {
     public static NetworkTransactionService networkTransactionService;
 
     @Mock
     RpcProviderService rpcProviderRegistry;
-
     @Mock
     private NotificationService notificationService;
 
@@ -40,14 +39,11 @@ public class NbiNotificationsProviderTest  extends AbstractTest {
     @Test
     void initTest() {
         networkTransactionService = new NetworkTransactionImpl(getDataBroker());
-        NbiNotificationsProvider provider = new NbiNotificationsProvider(
-                Arrays.asList("topic1", "topic2"), Arrays.asList("topic1", "topic2"), "localhost:8080",
-                "localhost:8080", rpcProviderRegistry, notificationService,
-                getDataStoreContextUtil().getBindingDOMCodecServices(), networkTransactionService);
-        provider.init();
-        verify(rpcProviderRegistry, times(2))
-                .registerRpcImplementation(any(), any(NbiNotificationsImpl.class));
+        new NbiNotificationsProvider("localhost:8080", "localhost:8080",
+                rpcProviderRegistry, notificationService, getDataStoreContextUtil().getBindingDOMCodecServices(),
+                networkTransactionService);
+        verify(rpcProviderRegistry, times(1)).registerRpcImplementations(any(ClassToInstanceMap.class));
         verify(notificationService, times(1))
-                .registerNotificationListener(any(NbiNotificationsListenerImpl.class));
+                .registerCompositeListener(any(NotificationService.CompositeListener.class));
     }
 }