Remove RpcServiceInvoker.from(Class)
[mdsal.git] / binding / mdsal-binding-dom-adapter / src / test / java / org / opendaylight / mdsal / binding / dom / adapter / invoke / RpcServiceInvokerTest.java
index 7e3ac44c424f105444b9516a517bd948a4d43f4d..1464983bd96382317b0e1ec23f519aa21d4fd7cd 100644 (file)
@@ -8,37 +8,27 @@
 package org.opendaylight.mdsal.binding.dom.adapter.invoke;
 
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
 
-import com.google.common.collect.ImmutableMap;
 import java.lang.reflect.Method;
+import java.util.Map;
 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;
 import org.opendaylight.yangtools.yang.common.XMLNamespace;
 
 public class RpcServiceInvokerTest {
-
     @Test
     public void fromTest() throws Exception {
         final Method method = this.getClass().getDeclaredMethod("testMethod");
         method.setAccessible(true);
-        assertNotNull(RpcServiceInvoker.from(ImmutableMap.of(
+        assertNotNull(RpcServiceInvoker.from(Map.of(
             QName.create(QNameModule.create(XMLNamespace.of("testURI"), Revision.of("2017-10-26")),"test"), method,
             QName.create(QNameModule.create(XMLNamespace.of("testURI2"), Revision.of("2017-10-26")),"test"), method)));
-        assertNotNull(RpcServiceInvoker.from(ImmutableMap.of(
+        assertNotNull(RpcServiceInvoker.from(Map.of(
             QName.create(QNameModule.create(XMLNamespace.of("testURI"), Revision.of("2017-10-26")), "test"), method)));
     }
 
-    @Deprecated(forRemoval = true)
-    @Test(expected = IllegalArgumentException.class)
-    public void fromWithExceptionTest() {
-        RpcServiceInvoker.from(RpcService.class);
-        fail("Expected IllegalArgumentException");
-    }
-
     private void testMethod() {
         // NOOP
     }