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 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());
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);
}