4eab89ee25cb485656b69d58c743e6d060519f08
[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 @Deprecated(since = "11.0.0", forRemoval = true)
21 public class RpcServiceInvokerTest {
22     @Test
23     public void fromTest() throws Exception {
24         final Method method = this.getClass().getDeclaredMethod("testMethod");
25         method.setAccessible(true);
26         assertNotNull(RpcServiceInvoker.from(Map.of(
27             QName.create(QNameModule.create(XMLNamespace.of("testURI"), Revision.of("2017-10-26")),"test"), method,
28             QName.create(QNameModule.create(XMLNamespace.of("testURI2"), Revision.of("2017-10-26")),"test"), method)));
29         assertNotNull(RpcServiceInvoker.from(Map.of(
30             QName.create(QNameModule.create(XMLNamespace.of("testURI"), Revision.of("2017-10-26")), "test"), method)));
31     }
32
33     private void testMethod() {
34         // NOOP
35     }
36 }