summaryrefslogtreecommitdiffstats
path: root/infra/it/it-test/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'infra/it/it-test/src/test/java')
-rw-r--r--infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/AbstractInfraTest.java10
-rw-r--r--infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombReadInfraTest.java8
-rw-r--r--infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombSubtreeReadInfraTest.java8
3 files changed, 13 insertions, 13 deletions
diff --git a/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/AbstractInfraTest.java b/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/AbstractInfraTest.java
index b9ef78d77..392f6e768 100644
--- a/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/AbstractInfraTest.java
+++ b/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/AbstractInfraTest.java
@@ -20,14 +20,13 @@ import static org.mockito.Mockito.when;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
-import com.google.common.util.concurrent.Futures;
import java.util.Arrays;
import java.util.Map;
import javassist.ClassPool;
import org.junit.Before;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec;
+import org.opendaylight.mdsal.binding.dom.adapter.BindingToNormalizedNodeCodec;
import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
import org.opendaylight.mdsal.binding.dom.codec.gen.impl.DataObjectSerializerGenerator;
import org.opendaylight.mdsal.binding.dom.codec.gen.impl.StreamWriterGenerator;
@@ -35,6 +34,7 @@ import org.opendaylight.mdsal.binding.dom.codec.impl.BindingNormalizedNodeCodecR
import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext;
import org.opendaylight.mdsal.binding.generator.util.BindingRuntimeContext;
import org.opendaylight.mdsal.binding.generator.util.JavassistUtils;
+import org.opendaylight.yangtools.util.concurrent.FluentFutures;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
@@ -52,9 +52,9 @@ abstract class AbstractInfraTest {
protected SchemaContext schemaContext;
@Mock
- protected org.opendaylight.controller.md.sal.binding.api.DataBroker contextBroker;
+ protected org.opendaylight.mdsal.binding.api.DataBroker contextBroker;
@Mock
- private org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction ctxTx;
+ private org.opendaylight.mdsal.binding.api.ReadWriteTransaction ctxTx;
static BindingToNormalizedNodeCodec getSerializer(final ModuleInfoBackedContext moduleInfoBackedContext,
final SchemaContext schemaContext) {
@@ -82,7 +82,7 @@ abstract class AbstractInfraTest {
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
when(contextBroker.newReadWriteTransaction()).thenReturn(ctxTx);
- when(ctxTx.submit()).thenReturn(Futures.immediateCheckedFuture(null));
+ when(ctxTx.commit()).thenReturn(FluentFutures.immediateNullFluentFuture());
initSerializer();
postSetup();
diff --git a/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombReadInfraTest.java b/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombReadInfraTest.java
index 2c50a5381..e39b7bf72 100644
--- a/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombReadInfraTest.java
+++ b/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombReadInfraTest.java
@@ -32,10 +32,9 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
-import com.google.common.base.Optional;
import com.google.common.collect.Lists;
import com.google.common.collect.Multimap;
-import com.google.common.util.concurrent.CheckedFuture;
+import com.google.common.util.concurrent.FluentFuture;
import io.fd.honeycomb.test.model.Ids;
import io.fd.honeycomb.translate.impl.read.GenericListReader;
import io.fd.honeycomb.translate.impl.read.GenericReader;
@@ -51,6 +50,7 @@ import io.fd.honeycomb.translate.util.read.ReflexiveListReaderCustomizer;
import io.fd.honeycomb.translate.util.read.ReflexiveReaderCustomizer;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
+import java.util.Optional;
import java.util.stream.Collectors;
import javax.annotation.Nonnull;
import org.junit.Test;
@@ -151,11 +151,11 @@ public class HoneycombReadInfraTest extends AbstractInfraTest {
public void testReadAll() throws Exception {
final ReadableDataTreeDelegator readableDataTreeDelegator =
new ReadableDataTreeDelegator(serializer, schemaContext, registry, contextBroker);
- final CheckedFuture<Optional<NormalizedNode<?, ?>>, org.opendaylight.controller.md.sal.common.api.data.ReadFailedException>
+ final FluentFuture<Optional<NormalizedNode<?, ?>>>
read = readableDataTreeDelegator.read(YangInstanceIdentifier.EMPTY);
final Multimap<InstanceIdentifier<? extends DataObject>, ? extends DataObject> readAll =
- toBinding(read.checkedGet().get());
+ toBinding(read.get().get());
assertThat(readAll.size(), is(2));
assertTrue(readAll.containsKey(Ids.CONTAINER_WITH_LIST_ID));
assertEquals(readContainerWithList(), readAll.get(Ids.CONTAINER_WITH_LIST_ID).stream().findFirst().get());
diff --git a/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombSubtreeReadInfraTest.java b/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombSubtreeReadInfraTest.java
index b3d24e5b5..ff288afbb 100644
--- a/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombSubtreeReadInfraTest.java
+++ b/infra/it/it-test/src/test/java/io/fd/honeycomb/data/impl/HoneycombSubtreeReadInfraTest.java
@@ -20,11 +20,10 @@ import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
-import com.google.common.base.Optional;
import com.google.common.collect.Lists;
import com.google.common.collect.Multimap;
import com.google.common.collect.Sets;
-import com.google.common.util.concurrent.CheckedFuture;
+import com.google.common.util.concurrent.FluentFuture;
import io.fd.honeycomb.test.model.Ids;
import io.fd.honeycomb.translate.impl.read.GenericListReader;
import io.fd.honeycomb.translate.impl.read.registry.CompositeReaderRegistryBuilder;
@@ -35,6 +34,7 @@ import io.fd.honeycomb.translate.read.Reader;
import io.fd.honeycomb.translate.read.registry.ReaderRegistry;
import io.fd.honeycomb.translate.util.YangDAG;
import io.fd.honeycomb.translate.util.read.ReflexiveListReaderCustomizer;
+import java.util.Optional;
import java.util.stream.Collectors;
import org.junit.Test;
import org.mockito.Mock;
@@ -96,11 +96,11 @@ public class HoneycombSubtreeReadInfraTest extends AbstractInfraTest {
public void testReadAll() throws Exception {
final ReadableDataTreeDelegator readableDataTreeDelegator =
new ReadableDataTreeDelegator(serializer, schemaContext, registry, contextBroker);
- final CheckedFuture<Optional<NormalizedNode<?, ?>>, org.opendaylight.controller.md.sal.common.api.data.ReadFailedException>
+ final FluentFuture<Optional<NormalizedNode<?, ?>>>
read = readableDataTreeDelegator.read(YangInstanceIdentifier.EMPTY);
final Multimap<InstanceIdentifier<? extends DataObject>, ? extends DataObject> readAll =
- toBinding(read.checkedGet().get());
+ toBinding(read.get().get());
assertThat(readAll.size(), is(1));
assertEquals(readEntireSubtree(), readAll.get(Ids.CONTAINER_WITH_LIST_ID).stream().findFirst().get());
}