- public static NormalizedNode<?,?> readStore(final InMemoryDOMDataStore store, final YangInstanceIdentifier id)
- throws ExecutionException, InterruptedException {
- DOMStoreReadTransaction transaction = store.newReadOnlyTransaction();
+ protected Object prepareForwardedReadyTransaction(ShardDataTreeCohort cohort, String transactionID,
+ short version, boolean doCommitOnReady) {
+ ShardDataTreeTransactionParent mockParent = mock(ShardDataTreeTransactionParent.class);
+ doReturn(cohort).when(mockParent).finishTransaction(any(ReadWriteShardDataTreeTransaction.class));
+ doNothing().when(mockParent).abortTransaction(any(AbstractShardDataTreeTransaction.class));
+ return new ForwardedReadyTransaction(transactionID, version,
+ new ReadWriteShardDataTreeTransaction(mockParent, transactionID,
+ mock(DataTreeModification.class)), true, doCommitOnReady);
+ }
+
+ protected Object prepareReadyTransactionMessage(boolean remoteReadWriteTransaction, Shard shard, ShardDataTreeCohort cohort,
+ String transactionID,
+ MutableCompositeModification modification) {
+ return prepareReadyTransactionMessage(remoteReadWriteTransaction, shard, cohort, transactionID, modification, false);
+ }