import static org.junit.Assert.assertNotNull;
import static org.mockito.Mockito.mock;
-import com.google.common.collect.ImmutableMap;
-import java.lang.reflect.Method;
+import java.util.Map;
import org.junit.Test;
import org.opendaylight.mdsal.binding.dom.codec.spi.BindingDOMCodecServices;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.bi.ba.rpcservice.rev140701.OpendaylightTestRpcServiceService;
import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.common.QNameModule;
-import org.opendaylight.yangtools.yang.common.XMLNamespace;
@Deprecated(since = "11.0.0", forRemoval = true)
-
public class LegacyDOMRpcImplementationAdapterTest {
@Test
public void basicTest() throws Exception {
- final BindingDOMCodecServices registry = mock(BindingDOMCodecServices.class);
- final Method testMethod = getClass().getDeclaredMethod("testMethod");
- final QName rpcType = QName.create(QNameModule.create(XMLNamespace.of("tst")), "test");
- final LegacyDOMRpcImplementationAdapter adapter = new LegacyDOMRpcImplementationAdapter(
- new ConstantAdapterContext(registry), OpendaylightTestRpcServiceService.class,
- ImmutableMap.of(rpcType, testMethod), mock(OpendaylightTestRpcServiceService.class));
+ final var codecServices = mock(BindingDOMCodecServices.class);
+ final var testMethod = getClass().getDeclaredMethod("testMethod");
+ final var rpcType = QName.create("tst", "test");
+ final var adapter = new LegacyDOMRpcImplementationAdapter<>(new ConstantAdapterContext(codecServices),
+ OpendaylightTestRpcServiceService.class, Map.of(rpcType, testMethod),
+ mock(OpendaylightTestRpcServiceService.class));
assertNotNull(adapter);
}