@Test
public void testCreateTransaction() {

    final ShardTestKit testKit = new ShardTestKit(getSystem());
    final ActorRef shard = actorFactory.createActor(newShardProps(), "testCreateTransaction");
    ShardTestKit.waitUntilLeader(shard);
    shard.tell(new UpdateSchemaContext(TestModel.createTestContext()), testKit.getRef());
    shard.tell(new CreateTransaction(nextTransactionId(), TransactionType.READ_ONLY.ordinal(),
        DataStoreVersions.CURRENT_VERSION).toSerializable(), testKit.getRef());
    final CreateTransactionReply reply = testKit.expectMsgClass(Duration.ofSeconds(3),
        CreateTransactionReply.class);
    final String path = reply.getTransactionPath().toString();
    assertTrue("Unexpected transaction path " + path, path.startsWith(String.format(
        "akka://test/user/testCreateTransaction/shard-%s-%s:ShardTransactionTest@0:",
        shardID.getShardName(), shardID.getMemberName().getName())));
}