X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fimpl%2Fosgi%2FNetconfOperationServiceFactoryTrackerTest.java;h=c75cdcd27a139db748db23d03c6fed5f8f767fc6;hp=374e8aeb9fe78977f9b7c7dd4175938cb1e23668;hb=5c008222efa5c0af49cf8a52881a6299b1e249dc;hpb=c352d8958cf16d2eded7bb103b7be69546164ce5 diff --git a/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationServiceFactoryTrackerTest.java b/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationServiceFactoryTrackerTest.java index 374e8aeb9f..c75cdcd27a 100644 --- a/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationServiceFactoryTrackerTest.java +++ b/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationServiceFactoryTrackerTest.java @@ -8,19 +8,25 @@ package org.opendaylight.controller.netconf.impl.osgi; +import static org.junit.Assert.assertNotNull; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.anyString; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; +import org.opendaylight.controller.netconf.api.util.NetconfConstants; import org.opendaylight.controller.netconf.mapping.api.NetconfOperationServiceFactory; +import org.opendaylight.controller.netconf.mapping.api.NetconfOperationServiceFactoryListener; import org.osgi.framework.BundleContext; import org.osgi.framework.Filter; import org.osgi.framework.ServiceReference; -import static org.junit.Assert.assertNotNull; -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.*; - public class NetconfOperationServiceFactoryTrackerTest { @Mock @@ -32,7 +38,7 @@ public class NetconfOperationServiceFactoryTrackerTest { @Mock private NetconfOperationServiceFactory factory; @Mock - private ServiceReference reference; + private ServiceReference reference; private NetconfOperationServiceFactoryTracker tracker; @@ -42,6 +48,7 @@ public class NetconfOperationServiceFactoryTrackerTest { doNothing().when(listener).onRemoveNetconfOperationServiceFactory(any(NetconfOperationServiceFactory.class)); doReturn(filter).when(context).createFilter(anyString()); doReturn("").when(reference).toString(); + doReturn(NetconfConstants.CONFIG_NETCONF_CONNECTOR).when(reference).getProperty(NetconfConstants.SERVICE_NAME); doReturn(factory).when(context).getService(any(ServiceReference.class)); doReturn("").when(factory).toString(); doNothing().when(listener).onAddNetconfOperationServiceFactory(any(NetconfOperationServiceFactory.class));