X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fmdsal-netconf-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fmdsal%2Fconnector%2Fops%2FRuntimeRpcTest.java;h=3e88711d48af1cf6ff257d305fa1a6a27e90d6ac;hb=be9e646f67e160652f89d78c7dd2377fc36c7d1d;hp=28508dbad5d3536fc54dea7c5dcd52f1d2e21bf4;hpb=1aaec97aa24f5dfe62fd3e6523e651db883ab51f;p=netconf.git diff --git a/netconf/mdsal-netconf-connector/src/test/java/org/opendaylight/netconf/mdsal/connector/ops/RuntimeRpcTest.java b/netconf/mdsal-netconf-connector/src/test/java/org/opendaylight/netconf/mdsal/connector/ops/RuntimeRpcTest.java index 28508dbad5..3e88711d48 100644 --- a/netconf/mdsal-netconf-connector/src/test/java/org/opendaylight/netconf/mdsal/connector/ops/RuntimeRpcTest.java +++ b/netconf/mdsal-netconf-connector/src/test/java/org/opendaylight/netconf/mdsal/connector/ops/RuntimeRpcTest.java @@ -10,7 +10,7 @@ package org.opendaylight.netconf.mdsal.connector.ops; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doReturn; @@ -37,7 +37,7 @@ import org.opendaylight.controller.md.sal.dom.api.DOMRpcException; import org.opendaylight.controller.md.sal.dom.api.DOMRpcResult; import org.opendaylight.controller.md.sal.dom.api.DOMRpcService; import org.opendaylight.controller.md.sal.dom.spi.DefaultDOMRpcResult; -import org.opendaylight.controller.sal.core.api.model.SchemaService; +import org.opendaylight.mdsal.dom.api.DOMSchemaService; import org.opendaylight.netconf.api.DocumentedException; import org.opendaylight.netconf.api.DocumentedException.ErrorSeverity; import org.opendaylight.netconf.api.DocumentedException.ErrorTag; @@ -126,7 +126,8 @@ public class RuntimeRpcTest { @Nonnull final SchemaPath type, @Nullable final NormalizedNode input) { final Collection> children = (Collection>) input.getValue(); - final Module module = schemaContext.findModule(type.getLastComponent().getNamespace()).orElse(null); + final Module module = schemaContext.findModules(type.getLastComponent().getNamespace()).stream() + .findFirst().orElse(null); final RpcDefinition rpcDefinition = getRpcDefinitionFromModule( module, module.getNamespace(), type.getLastComponent().getLocalName()); final ContainerSchemaNode outputSchemaNode = rpcDefinition.getOutput(); @@ -149,7 +150,7 @@ public class RuntimeRpcTest { private CurrentSchemaContext currentSchemaContext = null; @Mock - private SchemaService schemaService; + private DOMSchemaService schemaService; @Mock private SchemaContextListener listener; @Mock @@ -162,8 +163,6 @@ public class RuntimeRpcTest { initMocks(this); doNothing().when(registration).close(); doReturn(listener).when(registration).getInstance(); - doNothing().when(schemaService).addModule(any(Module.class)); - doNothing().when(schemaService).removeModule(any(Module.class)); doReturn(schemaContext).when(schemaService).getGlobalContext(); doReturn(schemaContext).when(schemaService).getSessionContext(); doAnswer(invocationOnMock -> {