Akka.Remote.Tests.RemoteRouterSpec.RemoteRouter_must_deploy_remote_routers_based_on_explicit_deployment C# (CSharp) Method

RemoteRouter_must_deploy_remote_routers_based_on_explicit_deployment() private method

        public void RemoteRouter_must_deploy_remote_routers_based_on_explicit_deployment()
        {
            var probe = CreateTestProbe(masterActorSystem);
            var router = masterActorSystem.ActorOf(new RoundRobinPool(2).Props(Props.Create<Echo>())
                .WithDeploy(
                new Deploy(new RemoteScope(intendedRemoteAddress))), "remote-blub2");

            router.Path.Address.ShouldBe(intendedRemoteAddress);

            var replies = new HashSet<ActorPath>();
            for (var i = 0; i < 5; i++)
            {
                router.Tell("", probe.Ref);
                var expected = probe.ExpectMsg<IActorRef>(GetTimeoutOrDefault(null));
                replies.Add(expected.Path);
            }

            Assert.Equal(2, replies.Count);
            var parents = replies.Select(x => x.Parent).Distinct().ToList();
            parents.Head().ShouldBe(router.Path);

            Assert.True(replies.All(x => x.Address.Equals(intendedRemoteAddress)));
            masterActorSystem.Stop(router);
        }