Remove RpcServiceInvoker.from(Class)
[mdsal.git] / binding / mdsal-binding-dom-adapter / src / test / java / org / opendaylight / mdsal / binding / dom / adapter / invoke / RpcServiceInvokerTest.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.mdsal.binding.dom.adapter.invoke;
9
10 import static org.junit.Assert.assertNotNull;
11
12 import java.lang.reflect.Method;
13 import java.util.Map;
14 import org.junit.Test;
15 import org.opendaylight.yangtools.yang.common.QName;
16 import org.opendaylight.yangtools.yang.common.QNameModule;
17 import org.opendaylight.yangtools.yang.common.Revision;
18 import org.opendaylight.yangtools.yang.common.XMLNamespace;
19
20 public class RpcServiceInvokerTest {
21     @Test
22     public void fromTest() throws Exception {
23         final Method method = this.getClass().getDeclaredMethod("testMethod");
24         method.setAccessible(true);
25         assertNotNull(RpcServiceInvoker.from(Map.of(
26             QName.create(QNameModule.create(XMLNamespace.of("testURI"), Revision.of("2017-10-26")),"test"), method,
27             QName.create(QNameModule.create(XMLNamespace.of("testURI2"), Revision.of("2017-10-26")),"test"), method)));
28         assertNotNull(RpcServiceInvoker.from(Map.of(
29             QName.create(QNameModule.create(XMLNamespace.of("testURI"), Revision.of("2017-10-26")), "test"), method)));
30     }
31
32     private void testMethod() {
33         // NOOP
34     }
35 }