summaryrefslogtreecommitdiffstats
path: root/infra/cfg-init/src/test/java/io/fd
diff options
context:
space:
mode:
authorMichal Cmarada <mcmarada@cisco.com>2019-04-08 11:37:45 +0200
committerMichal Cmarada <mcmarada@cisco.com>2019-04-08 11:37:45 +0200
commitb16cea20258ba537db7c0755208c82ab93331ff7 (patch)
tree8a5a3c87069b9ce700c34323e75ff434e7acae97 /infra/cfg-init/src/test/java/io/fd
parent23979469bcf8cd312cb3ec9e9e548003110f68f4 (diff)
HONEYCOMB-443: ODL bump to Neon
- bumps ODL dependencies to neon - migrates guava optional to java.utils.optional Change-Id: Ibdaa365c7e21a341103aba88dfd67277e40d2969 Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'infra/cfg-init/src/test/java/io/fd')
-rw-r--r--infra/cfg-init/src/test/java/io/fd/honeycomb/data/init/RestoringInitializerTest.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/infra/cfg-init/src/test/java/io/fd/honeycomb/data/init/RestoringInitializerTest.java b/infra/cfg-init/src/test/java/io/fd/honeycomb/data/init/RestoringInitializerTest.java
index 3aeb6895b..7c10988bf 100644
--- a/infra/cfg-init/src/test/java/io/fd/honeycomb/data/init/RestoringInitializerTest.java
+++ b/infra/cfg-init/src/test/java/io/fd/honeycomb/data/init/RestoringInitializerTest.java
@@ -20,7 +20,6 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
-import com.google.common.util.concurrent.Futures;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
@@ -31,10 +30,11 @@ import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
-import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
+import org.opendaylight.mdsal.dom.api.DOMDataBroker;
+import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction;
import org.opendaylight.mdsal.dom.api.DOMSchemaService;
+import org.opendaylight.yangtools.util.concurrent.FluentFutures;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
@@ -53,7 +53,7 @@ public class RestoringInitializerTest {
@Mock
private ContainerNode data;
@Mock
- private DOMDataWriteTransaction writeTx;
+ private DOMDataTreeWriteTransaction writeTx;
private Path path;
private YangInstanceIdentifier.NodeIdentifier nodeId =
new YangInstanceIdentifier.NodeIdentifier(QName.create("namespace", "data"));
@@ -65,7 +65,7 @@ public class RestoringInitializerTest {
when(schemaService.getGlobalContext()).thenReturn(schemaContext);
when(jsonReader.readData(schemaContext, path)).thenReturn(data);
when(dataTree.newWriteOnlyTransaction()).thenReturn(writeTx);
- when(writeTx.submit()).thenReturn(Futures.immediateCheckedFuture(null));
+ when(writeTx.commit()).thenReturn(FluentFutures.immediateNullFluentFuture());
when(data.getValue()).thenReturn(Collections.singleton(data));
when(data.getIdentifier()).thenReturn(nodeId);
}
@@ -92,7 +92,7 @@ public class RestoringInitializerTest {
verify(dataTree).newWriteOnlyTransaction();
verify(writeTx).put(LogicalDatastoreType.OPERATIONAL, YangInstanceIdentifier.create(nodeId), data);
- verify(writeTx).submit();
+ verify(writeTx).commit();
}
@Test