Fix warnings in netconfig-monitoring 56/12556/2
authorRobert Varga <rovarga@cisco.com>
Thu, 6 Nov 2014 10:48:03 +0000 (11:48 +0100)
committerRobert Varga <rovarga@cisco.com>
Thu, 6 Nov 2014 13:51:38 +0000 (14:51 +0100)
Removes the use of deprecated junit classes and raw types.

Change-Id: I594f2cc10771d8a5291cbab3f651a6fb01ac7a4c
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/netconf/netconf-monitoring/src/test/java/org/opendaylight/controller/netconf/monitoring/GetTest.java
opendaylight/netconf/netconf-monitoring/src/test/java/org/opendaylight/controller/netconf/monitoring/osgi/NetconfMonitoringActivatorTest.java
opendaylight/netconf/netconf-monitoring/src/test/java/org/opendaylight/controller/netconf/monitoring/osgi/NetconfMonitoringServiceTrackerTest.java

index 5fceac06dd51c4b0798159571764b4826191b906..5a744fda14f2f1bc5cac2e2a7aec57bde9817d04 100644 (file)
@@ -8,13 +8,12 @@
 
 package org.opendaylight.controller.netconf.monitoring;
 
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertTrue;
-import static junit.framework.TestCase.fail;
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.doThrow;
-
 import java.util.Collections;
 import org.hamcrest.CoreMatchers;
 import org.junit.Before;
index 40493569d68adaf9ec54f9249cbe7fac8ab11bdc..b5b9f3c060f5bdf6c98abf832c256ab894ad95c2 100644 (file)
@@ -8,6 +8,12 @@
 
 package org.opendaylight.controller.netconf.monitoring.osgi;
 
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.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 java.util.Arrays;
 import org.junit.Before;
 import org.junit.Test;
@@ -18,10 +24,6 @@ import org.osgi.framework.Filter;
 import org.osgi.framework.ServiceListener;
 import org.osgi.framework.ServiceReference;
 
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.*;
-
 public class NetconfMonitoringActivatorTest {
 
     @Mock
@@ -34,7 +36,7 @@ public class NetconfMonitoringActivatorTest {
         MockitoAnnotations.initMocks(this);
         doReturn(filter).when(context).createFilter(anyString());
         doNothing().when(context).addServiceListener(any(ServiceListener.class), anyString());
-        ServiceReference[] refs = new ServiceReference[2];
+        ServiceReference<?>[] refs = new ServiceReference[2];
         doReturn(Arrays.asList(refs)).when(context).getServiceReferences(any(Class.class), anyString());
         doReturn(refs).when(context).getServiceReferences(anyString(), anyString());
     }
index 2a53a6ce45925e0223f4c5df508e4b4bf1a1245b..b992b0e44f363deaba01eeca50d9194d40fefc81 100644 (file)
@@ -8,6 +8,12 @@
 
 package org.opendaylight.controller.netconf.monitoring.osgi;
 
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.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 java.util.Hashtable;
 import org.junit.Before;
 import org.junit.Test;
@@ -20,18 +26,14 @@ import org.osgi.framework.Filter;
 import org.osgi.framework.ServiceReference;
 import org.osgi.framework.ServiceRegistration;
 
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyCollection;
-import static org.mockito.Mockito.*;
-
 public class NetconfMonitoringServiceTrackerTest {
 
     @Mock
-    private ServiceReference reference;
+    private ServiceReference<NetconfMonitoringService> reference;
     @Mock
     private BundleContext context;
     @Mock
-    private ServiceRegistration serviceRegistration;
+    private ServiceRegistration<?> serviceRegistration;
     @Mock
     private Filter filter;
     @Mock