Split up MessageTransformer
[netconf.git] / netconf / sal-netconf-connector / src / test / java / org / opendaylight / netconf / sal / connect / netconf / sal / NetconfDeviceNotificationServiceTest.java
index 5a2539635d9c205766da6a467f865457d7b27835..4bcaf407e5e0480f784e42677ce28f0c9015a068 100644 (file)
@@ -5,7 +5,6 @@
  * 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.netconf.sal.connect.netconf.sal;
 
 import static org.mockito.Mockito.doReturn;
@@ -13,18 +12,19 @@ import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 
-import java.net.URI;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.opendaylight.controller.md.sal.dom.api.DOMNotification;
-import org.opendaylight.controller.md.sal.dom.api.DOMNotificationListener;
+import org.mockito.junit.MockitoJUnitRunner;
+import org.opendaylight.mdsal.dom.api.DOMNotification;
+import org.opendaylight.mdsal.dom.api.DOMNotificationListener;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.SchemaPath;
+import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
 
+@RunWith(MockitoJUnitRunner.StrictStubs.class)
 public class NetconfDeviceNotificationServiceTest {
 
     @Mock
@@ -42,16 +42,14 @@ public class NetconfDeviceNotificationServiceTest {
 
     @Before
     public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        final SchemaPath path1 = SchemaPath.create(true, new QName(new URI("namespace1"), "path1"));
-        final SchemaPath path2 = SchemaPath.create(true, new QName(new URI("namespace2"), "path2"));
+        final Absolute path1 = Absolute.of(QName.create("namespace1", "path1"));
+        final Absolute path2 = Absolute.of(QName.create("namespace2", "path2"));
         service = new NetconfDeviceNotificationService();
         service.registerNotificationListener(listener1, path1);
         registration = service.registerNotificationListener(listener2, path2);
 
         doReturn(path1).when(notification1).getType();
         doReturn(path2).when(notification2).getType();
-
     }
 
     @Test