LegacyDOMRpcImplementationAdapter is generic
[mdsal.git] / binding / mdsal-binding-dom-adapter / src / test / java / org / opendaylight / mdsal / binding / dom / adapter / LegacyDOMRpcImplementationAdapterTest.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;
9
10 import static org.junit.Assert.assertNotNull;
11 import static org.mockito.Mockito.mock;
12
13 import java.util.Map;
14 import org.junit.Test;
15 import org.opendaylight.mdsal.binding.dom.codec.spi.BindingDOMCodecServices;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.bi.ba.rpcservice.rev140701.OpendaylightTestRpcServiceService;
17 import org.opendaylight.yangtools.yang.common.QName;
18
19 @Deprecated(since = "11.0.0", forRemoval = true)
20 public class LegacyDOMRpcImplementationAdapterTest {
21     @Test
22     public void basicTest() throws Exception {
23         final var codecServices = mock(BindingDOMCodecServices.class);
24         final var testMethod = getClass().getDeclaredMethod("testMethod");
25         final var rpcType = QName.create("tst", "test");
26         final var adapter = new LegacyDOMRpcImplementationAdapter<>(new ConstantAdapterContext(codecServices),
27             OpendaylightTestRpcServiceService.class, Map.of(rpcType, testMethod),
28             mock(OpendaylightTestRpcServiceService.class));
29         assertNotNull(adapter);
30     }
31
32     private void testMethod() {
33         //NOOP
34     }
35 }