2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.mdsal.binding.dom.adapter;
10 import static org.junit.Assert.assertNotNull;
11 import static org.mockito.Mockito.mock;
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;
19 @Deprecated(since = "11.0.0", forRemoval = true)
20 public class LegacyDOMRpcImplementationAdapterTest {
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);
32 private void testMethod() {