Migrate users of deprecated yang.common methods
[mdsal.git] / binding / mdsal-binding-dom-adapter / src / test / java / org / opendaylight / mdsal / binding / dom / adapter / LazyDOMRpcResultFutureTest.java
index 39fb640107ffdf5106082bcdd50d8b56f8fd20ec..63af518365281ea5c4236762ad488ce483ed65d9 100644 (file)
@@ -10,8 +10,8 @@ package org.opendaylight.mdsal.binding.dom.adapter;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.doThrow;
@@ -25,20 +25,20 @@ import java.lang.reflect.Field;
 import java.util.concurrent.TimeUnit;
 import org.junit.Before;
 import org.junit.Test;
-import org.opendaylight.mdsal.binding.dom.codec.impl.BindingNormalizedNodeCodecRegistry;
-import org.opendaylight.yangtools.yang.binding.DataContainer;
+import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
+import org.opendaylight.yangtools.yang.binding.RpcOutput;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 
 public class LazyDOMRpcResultFutureTest {
 
     private LazyDOMRpcResultFuture lazyDOMRpcResultFuture;
-    private final BindingNormalizedNodeCodecRegistry codec = mock(BindingNormalizedNodeCodecRegistry.class);
-    private final ListenableFuture future = mock(ListenableFuture.class);
-    private final RpcResult domRpcResult = mock(RpcResult.class);
+    private final BindingNormalizedNodeSerializer codec = mock(BindingNormalizedNodeSerializer.class);
+    private final ListenableFuture<RpcResult<?>> future = mock(ListenableFuture.class);
+    private final RpcResult<?> domRpcResult = mock(RpcResult.class);
 
     @Before
     public void setUp() throws Exception {
-        lazyDOMRpcResultFuture = (LazyDOMRpcResultFuture) LazyDOMRpcResultFuture.create(codec, future);
+        lazyDOMRpcResultFuture = LazyDOMRpcResultFuture.create(codec, future);
         reset(future);
         doReturn(true).when(future).cancel(anyBoolean());
         doNothing().when(future).addListener(any(), any());
@@ -48,7 +48,7 @@ public class LazyDOMRpcResultFutureTest {
         doReturn(true).when(future).isCancelled();
         doReturn(true).when(future).isDone();
 
-        doReturn(mock(DataContainer.class)).when(domRpcResult).getResult();
+        doReturn(mock(RpcOutput.class)).when(domRpcResult).getResult();
         doReturn(domRpcResult).when(future).get();
         doReturn(domRpcResult).when(future).get(1, TimeUnit.SECONDS);
     }