public async Task AddReplicaAsync(ReplicaRole role, long?replicaId = null, int activationDelayMs = 0)
        {
            var serviceContext = MockStatefulServiceContextFactory.Create(CodePackageActivationContext, ServiceTypeName, ServiceUri, Guid.NewGuid(), replicaId ?? _random.Next());
            var replica        = new MockStatefulServiceReplica <TStatefulService>(_serviceFactory, serviceContext, _stateManager);
            await replica.CreateAsync(role);

            _replicas.Add(replica);
        }
        public async Task AddReplicaAsync(ReplicaRole role, long?replicaId = null, int activationDelayMs = 0, byte[] initializationData = null)
        {
            if (!replicaId.HasValue)
            {
                replicaId = _random.Next();
            }
            var serviceContext = MockStatefulServiceContextFactory.Create(CodePackageActivationContext, ServiceTypeName, ServiceUri, Guid.NewGuid(), replicaId.Value, initializationData);
            var stateManager   = _stateManagerFactory(serviceContext, _reliableStates);
            var replica        = new MockStatefulServiceReplica <TStatefulService>(_serviceFactory, serviceContext, stateManager);
            await replica.CreateAsync(role);

            _replicaDictionary.TryAdd(replicaId.Value, replica);
        }