+ protected ActorRef setupActorContextWithInitialCreateTransaction(ActorSystem actorSystem,
+ TransactionType type, int transactionVersion, String prefix, ActorRef shardActorRef) {
+
+ ActorRef txActorRef = actorSystem.actorOf(Props.create(DoNothingActor.class));
+ log.info("Created mock shard Tx actor {}", txActorRef);
+
+ doReturn(actorSystem.actorSelection(txActorRef.path())).when(mockActorContext).actorSelection(
+ txActorRef.path().toString());
+
+ doReturn(Futures.successful(createTransactionReply(txActorRef, transactionVersion))).when(mockActorContext).
+ executeOperationAsync(eq(actorSystem.actorSelection(shardActorRef.path())),
+ eqCreateTransaction(prefix, type));
+
+ return txActorRef;