X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FTransactionProxyTest.java;h=ce1d6f6948482102fdd83ea211b5428a60f0c577;hb=7ce039b3e55d153fc75bc88198c49536ab83befc;hp=dd0c9879db71803a31007dfa2164f900ba84b3cc;hpb=2fd1fa721510a30f58b3bc277deb05fce58badd6;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java index dd0c9879db..ce1d6f6948 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.controller.cluster.datastore; import static org.junit.Assert.assertEquals; @@ -80,7 +79,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot; import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; import scala.concurrent.Promise; @SuppressWarnings({"resource", "checkstyle:IllegalThrows", "checkstyle:AvoidHidingCauseException"}) @@ -103,12 +102,12 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { doReturn(readDataReply(null)).when(mockActorContext).executeOperationAsync( eq(actorSelection(actorRef)), eqReadData(), any(Timeout.class)); - Optional> readOptional = transactionProxy.read( + Optional readOptional = transactionProxy.read( TestModel.TEST_PATH).get(5, TimeUnit.SECONDS); assertFalse("NormalizedNode isPresent", readOptional.isPresent()); - NormalizedNode expectedNode = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode expectedNode = ImmutableNodes.containerNode(TestModel.TEST_QNAME); doReturn(readDataReply(expectedNode)).when(mockActorContext).executeOperationAsync( eq(actorSelection(actorRef)), eqReadData(), any(Timeout.class)); @@ -191,7 +190,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { public void testReadWithPriorRecordingOperationSuccessful() throws Exception { ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE); - NormalizedNode expectedNode = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode expectedNode = ImmutableNodes.containerNode(TestModel.TEST_QNAME); expectBatchedModifications(actorRef, 1); @@ -202,7 +201,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { transactionProxy.write(TestModel.TEST_PATH, expectedNode); - Optional> readOptional = transactionProxy.read( + Optional readOptional = transactionProxy.read( TestModel.TEST_PATH).get(5, TimeUnit.SECONDS); assertTrue("NormalizedNode isPresent", readOptional.isPresent()); @@ -300,7 +299,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { public void testExistsWithPriorRecordingOperationSuccessful() throws Exception { ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE); - NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); expectBatchedModifications(actorRef, 1); @@ -334,7 +333,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { dataStoreContextBuilder.shardBatchedModificationCount(1); ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY); - NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); expectBatchedModifications(actorRef, 1); @@ -361,16 +360,16 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { expectBatchedModificationsReady(actorRef); - final NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + final NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); final TransactionProxy transactionProxy = new TransactionProxy(mockComponentFactory, READ_WRITE); final CountDownLatch readComplete = new CountDownLatch(1); final AtomicReference caughtEx = new AtomicReference<>(); com.google.common.util.concurrent.Futures.addCallback(transactionProxy.read(TestModel.TEST_PATH), - new FutureCallback>>() { + new FutureCallback>() { @Override - public void onSuccess(final Optional> result) { + public void onSuccess(final Optional result) { try { transactionProxy.write(TestModel.TEST_PATH, nodeToWrite); } catch (Exception e) { @@ -423,7 +422,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { dataStoreContextBuilder.shardBatchedModificationCount(1); ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY); - NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); expectBatchedModifications(actorRef, 1); @@ -452,7 +451,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { public void testReadWrite() { ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE); - final NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + final NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); doReturn(readDataReply(null)).when(mockActorContext).executeOperationAsync( eq(actorSelection(actorRef)), eqReadData(), any(Timeout.class)); @@ -480,7 +479,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { public void testReadyWithReadWrite() { ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE); - final NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + final NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); doReturn(readDataReply(null)).when(mockActorContext).executeOperationAsync( eq(actorSelection(actorRef)), eqReadData(), any(Timeout.class)); @@ -595,7 +594,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY); - NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); expectBatchedModificationsReady(actorRef, true); @@ -621,7 +620,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { dataStoreContextBuilder.shardBatchedModificationCount(1).writeOnlyTransactionOptimizationsEnabled(true); ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY); - NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); expectBatchedModificationsReady(actorRef, true); @@ -650,7 +649,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), WRITE_ONLY); - NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); expectFailedBatchedModifications(actorRef); @@ -698,7 +697,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { expectReadyLocalTransaction(shardActorRef, true); - NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); transactionProxy.write(TestModel.TEST_PATH, nodeToWrite); DOMStoreThreePhaseCommitCohort ready = transactionProxy.ready(); @@ -729,7 +728,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { expectReadyLocalTransaction(shardActorRef, true); - NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); transactionProxy.write(TestModel.TEST_PATH, nodeToWrite); DOMStoreThreePhaseCommitCohort ready = transactionProxy.ready(); @@ -742,7 +741,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { TransactionProxy transactionProxy = new TransactionProxy(mockComponentFactory, WRITE_ONLY); - NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); transactionProxy.merge(TestModel.TEST_PATH, nodeToWrite); @@ -970,15 +969,14 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { return dataTree; } - private static DataTree createDataTree(final NormalizedNode readResponse) { + private static DataTree createDataTree(final NormalizedNode readResponse) { DataTree dataTree = mock(DataTree.class); DataTreeSnapshot dataTreeSnapshot = mock(DataTreeSnapshot.class); DataTreeModification dataTreeModification = mock(DataTreeModification.class); doReturn(dataTreeSnapshot).when(dataTree).takeSnapshot(); doReturn(dataTreeModification).when(dataTreeSnapshot).newModification(); - doReturn(java.util.Optional.of(readResponse)).when(dataTreeModification).readNode( - any(YangInstanceIdentifier.class)); + doReturn(Optional.of(readResponse)).when(dataTreeModification).readNode(any(YangInstanceIdentifier.class)); return dataTree; } @@ -987,7 +985,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { @Test public void testWriteCompletionForLocalShard() { completeOperationLocal(transactionProxy -> { - NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); transactionProxy.write(TestModel.TEST_PATH, nodeToWrite); @@ -999,7 +997,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { @Test public void testWriteThrottlingWhenShardFound() { throttleOperation(transactionProxy -> { - NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); expectIncompleteBatchedModifications(); @@ -1013,7 +1011,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { public void testWriteThrottlingWhenShardNotFound() { // Confirm that there is no throttling when the Shard is not found completeOperation(transactionProxy -> { - NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); expectBatchedModifications(2); @@ -1028,7 +1026,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { @Test public void testWriteCompletion() { completeOperation(transactionProxy -> { - NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); expectBatchedModifications(2); @@ -1041,7 +1039,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { @Test public void testMergeThrottlingWhenShardFound() { throttleOperation(transactionProxy -> { - NormalizedNode nodeToMerge = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToMerge = ImmutableNodes.containerNode(TestModel.TEST_QNAME); expectIncompleteBatchedModifications(); @@ -1054,7 +1052,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { @Test public void testMergeThrottlingWhenShardNotFound() { completeOperation(transactionProxy -> { - NormalizedNode nodeToMerge = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToMerge = ImmutableNodes.containerNode(TestModel.TEST_QNAME); expectBatchedModifications(2); @@ -1067,7 +1065,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { @Test public void testMergeCompletion() { completeOperation(transactionProxy -> { - NormalizedNode nodeToMerge = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToMerge = ImmutableNodes.containerNode(TestModel.TEST_QNAME); expectBatchedModifications(2); @@ -1081,7 +1079,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { @Test public void testMergeCompletionForLocalShard() { completeOperationLocal(transactionProxy -> { - NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); transactionProxy.merge(TestModel.TEST_PATH, nodeToWrite); @@ -1169,7 +1167,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { @Test public void testReadCompletion() { completeOperation(transactionProxy -> { - NormalizedNode nodeToRead = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToRead = ImmutableNodes.containerNode(TestModel.TEST_QNAME); doReturn(readDataReply(nodeToRead)).when(mockActorContext).executeOperationAsync( any(ActorSelection.class), eqReadData(), any(Timeout.class)); @@ -1183,7 +1181,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { @Test public void testReadCompletionForLocalShard() { - final NormalizedNode nodeToRead = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + final NormalizedNode nodeToRead = ImmutableNodes.containerNode(TestModel.TEST_QNAME); completeOperationLocal(transactionProxy -> { transactionProxy.read(TestModel.TEST_PATH); @@ -1244,7 +1242,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { @Test public void testExistsCompletionForLocalShard() { - final NormalizedNode nodeToRead = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + final NormalizedNode nodeToRead = ImmutableNodes.containerNode(TestModel.TEST_QNAME); completeOperationLocal(transactionProxy -> { transactionProxy.exists(TestModel.TEST_PATH); @@ -1267,7 +1265,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { public void testReadyThrottling() { throttleOperation(transactionProxy -> { - NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); expectBatchedModifications(1); @@ -1280,8 +1278,8 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { @Test public void testReadyThrottlingWithTwoTransactionContexts() { throttleOperation(transactionProxy -> { - NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); - NormalizedNode carsNode = ImmutableNodes.containerNode(CarsModel.BASE_QNAME); + NormalizedNode nodeToWrite = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode carsNode = ImmutableNodes.containerNode(CarsModel.BASE_QNAME); expectBatchedModifications(2); @@ -1305,22 +1303,22 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { expectBatchedModifications(actorRef, shardBatchedModificationCount); YangInstanceIdentifier writePath1 = TestModel.TEST_PATH; - NormalizedNode writeNode1 = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode writeNode1 = ImmutableNodes.containerNode(TestModel.TEST_QNAME); YangInstanceIdentifier writePath2 = TestModel.OUTER_LIST_PATH; - NormalizedNode writeNode2 = ImmutableNodes.containerNode(TestModel.OUTER_LIST_QNAME); + NormalizedNode writeNode2 = ImmutableNodes.containerNode(TestModel.OUTER_LIST_QNAME); YangInstanceIdentifier writePath3 = TestModel.INNER_LIST_PATH; - NormalizedNode writeNode3 = ImmutableNodes.containerNode(TestModel.INNER_LIST_QNAME); + NormalizedNode writeNode3 = ImmutableNodes.containerNode(TestModel.INNER_LIST_QNAME); YangInstanceIdentifier mergePath1 = TestModel.TEST_PATH; - NormalizedNode mergeNode1 = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode mergeNode1 = ImmutableNodes.containerNode(TestModel.TEST_QNAME); YangInstanceIdentifier mergePath2 = TestModel.OUTER_LIST_PATH; - NormalizedNode mergeNode2 = ImmutableNodes.containerNode(TestModel.OUTER_LIST_QNAME); + NormalizedNode mergeNode2 = ImmutableNodes.containerNode(TestModel.OUTER_LIST_QNAME); YangInstanceIdentifier mergePath3 = TestModel.INNER_LIST_PATH; - NormalizedNode mergeNode3 = ImmutableNodes.containerNode(TestModel.INNER_LIST_QNAME); + NormalizedNode mergeNode3 = ImmutableNodes.containerNode(TestModel.INNER_LIST_QNAME); YangInstanceIdentifier deletePath1 = TestModel.TEST_PATH; YangInstanceIdentifier deletePath2 = TestModel.OUTER_LIST_PATH; @@ -1381,16 +1379,16 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { expectBatchedModifications(actorRef, shardBatchedModificationCount); final YangInstanceIdentifier writePath1 = TestModel.TEST_PATH; - final NormalizedNode writeNode1 = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + final NormalizedNode writeNode1 = ImmutableNodes.containerNode(TestModel.TEST_QNAME); YangInstanceIdentifier writePath2 = TestModel.OUTER_LIST_PATH; - NormalizedNode writeNode2 = ImmutableNodes.containerNode(TestModel.OUTER_LIST_QNAME); + NormalizedNode writeNode2 = ImmutableNodes.containerNode(TestModel.OUTER_LIST_QNAME); final YangInstanceIdentifier mergePath1 = TestModel.TEST_PATH; - final NormalizedNode mergeNode1 = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + final NormalizedNode mergeNode1 = ImmutableNodes.containerNode(TestModel.TEST_QNAME); YangInstanceIdentifier mergePath2 = TestModel.INNER_LIST_PATH; - NormalizedNode mergeNode2 = ImmutableNodes.containerNode(TestModel.INNER_LIST_QNAME); + NormalizedNode mergeNode2 = ImmutableNodes.containerNode(TestModel.INNER_LIST_QNAME); final YangInstanceIdentifier deletePath = TestModel.OUTER_LIST_PATH; @@ -1408,7 +1406,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { transactionProxy.write(writePath1, writeNode1); transactionProxy.write(writePath2, writeNode2); - Optional> readOptional = transactionProxy.read(writePath2).get(5, TimeUnit.SECONDS); + Optional readOptional = transactionProxy.read(writePath2).get(5, TimeUnit.SECONDS); assertTrue("NormalizedNode isPresent", readOptional.isPresent()); assertEquals("Response NormalizedNode", writeNode2, readOptional.get()); @@ -1458,16 +1456,15 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { } @Test - public void testReadRoot() throws InterruptedException, ExecutionException, - java.util.concurrent.TimeoutException { - SchemaContext schemaContext = SchemaContextHelper.full(); + public void testReadRoot() throws InterruptedException, ExecutionException, java.util.concurrent.TimeoutException { + EffectiveModelContext schemaContext = SchemaContextHelper.full(); Configuration configuration = mock(Configuration.class); doReturn(configuration).when(mockActorContext).getConfiguration(); doReturn(schemaContext).when(mockActorContext).getSchemaContext(); doReturn(Sets.newHashSet("test", "cars")).when(configuration).getAllShardNames(); - NormalizedNode expectedNode1 = ImmutableNodes.containerNode(TestModel.TEST_QNAME); - NormalizedNode expectedNode2 = ImmutableNodes.containerNode(CarsModel.CARS_QNAME); + NormalizedNode expectedNode1 = ImmutableNodes.containerNode(TestModel.TEST_QNAME); + NormalizedNode expectedNode2 = ImmutableNodes.containerNode(CarsModel.CARS_QNAME); setUpReadData("test", NormalizedNodeAggregatorTest.getRootNode(expectedNode1, schemaContext)); setUpReadData("cars", NormalizedNodeAggregatorTest.getRootNode(expectedNode2, schemaContext)); @@ -1478,19 +1475,19 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { TransactionProxy transactionProxy = new TransactionProxy(mockComponentFactory, READ_ONLY); - Optional> readOptional = transactionProxy.read( - YangInstanceIdentifier.EMPTY).get(5, TimeUnit.SECONDS); + Optional readOptional = transactionProxy.read( + YangInstanceIdentifier.empty()).get(5, TimeUnit.SECONDS); assertTrue("NormalizedNode isPresent", readOptional.isPresent()); - NormalizedNode normalizedNode = readOptional.get(); + NormalizedNode normalizedNode = readOptional.get(); - assertTrue("Expect value to be a Collection", normalizedNode.getValue() instanceof Collection); + assertTrue("Expect value to be a Collection", normalizedNode.body() instanceof Collection); @SuppressWarnings("unchecked") - Collection> collection = (Collection>) normalizedNode.getValue(); + Collection collection = (Collection) normalizedNode.body(); - for (NormalizedNode node : collection) { + for (NormalizedNode node : collection) { assertTrue("Expected " + node + " to be a ContainerNode", node instanceof ContainerNode); } @@ -1506,7 +1503,7 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { } - private void setUpReadData(final String shardName, final NormalizedNode expectedNode) { + private void setUpReadData(final String shardName, final NormalizedNode expectedNode) { ActorSystem actorSystem = getSystem(); ActorRef shardActorRef = getSystem().actorOf(Props.create(DoNothingActor.class)); @@ -1526,6 +1523,6 @@ public class TransactionProxyTest extends AbstractTransactionProxyTest { eqCreateTransaction(memberName, TransactionType.READ_ONLY), any(Timeout.class)); doReturn(readDataReply(expectedNode)).when(mockActorContext).executeOperationAsync( - eq(actorSelection(txActorRef)), eqReadData(YangInstanceIdentifier.EMPTY), any(Timeout.class)); + eq(actorSelection(txActorRef)), eqReadData(YangInstanceIdentifier.empty()), any(Timeout.class)); } }