Adjust to yangtools-2.0.0 changes
[mdsal.git] / binding / yang-binding / src / test / java / org / opendaylight / yangtools / yang / binding / util / LocalNameRpcServiceInvokerTest.java
index 12344ba0605cf3f20c03f8f3b37cea1d31cd6c06..ba99b97bde85e46bfae9d479fab72229587ba8b0 100644 (file)
@@ -12,24 +12,25 @@ import static org.mockito.Mockito.mock;
 
 import com.google.common.collect.ImmutableMap;
 import java.net.URI;
-import java.util.Date;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.binding.RpcService;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.QNameModule;
+import org.opendaylight.yangtools.yang.common.Revision;
 
 public class LocalNameRpcServiceInvokerTest {
 
     private static RpcServiceInvoker rpcServiceInvoker;
-    private static final QNameModule Q_NAME_MODULE =
-            QNameModule.create(URI.create("testURI"), new Date(System.currentTimeMillis()));
+    private static final QNameModule Q_NAME_MODULE = QNameModule.create(URI.create("testURI"),
+        Revision.of("2017-10-26"));
     private static final RpcService RPC_SERVICE = mock(RpcService.class);
 
     @BeforeClass
     public static void setUp() throws Exception {
         rpcServiceInvoker = LocalNameRpcServiceInvoker.instanceFor(
-                Q_NAME_MODULE, ImmutableMap.of(QName.create("test"), Object.class.getDeclaredMethod("hashCode")));
+                Q_NAME_MODULE, ImmutableMap.of(QName.create(Q_NAME_MODULE, "test"),
+                    Object.class.getDeclaredMethod("hashCode")));
 
         assertNotNull(rpcServiceInvoker);
     }
@@ -41,6 +42,6 @@ public class LocalNameRpcServiceInvokerTest {
 
     @Test(expected = IllegalArgumentException.class)
     public void qnameToKeyWithNullTest() throws Exception {
-        rpcServiceInvoker.invokeRpc(RPC_SERVICE, QName.create("test"), null);
+        rpcServiceInvoker.invokeRpc(RPC_SERVICE, QName.create("", "test"), null);
     }
-}
\ No newline at end of file
+}