Akka.Cluster.Tests.ClusterSpec.A_cluster_must_be_allowed_to_join_and_leave_with_local_address C# (CSharp) Method

A_cluster_must_be_allowed_to_join_and_leave_with_local_address() private method

        public void A_cluster_must_be_allowed_to_join_and_leave_with_local_address()
        {
            var sys2 = ActorSystem.Create("ClusterSpec2", ConfigurationFactory.ParseString(@"akka.actor.provider = ""Akka.Cluster.ClusterActorRefProvider, Akka.Cluster""
        akka.remote.helios.tcp.port = 0"));

            try
            {
                var ref2 = sys2.ActorOf(Props.Empty);
                Cluster.Get(sys2).Join(ref2.Path.Address); // address doesn't contain full address information
                Within(TimeSpan.FromSeconds(5), () =>
                {
                    AwaitAssert(() =>
                    {
                        Cluster.Get(sys2).State.Members.Count.ShouldBe(1);
                        Cluster.Get(sys2).State.Members.First().Status.ShouldBe(MemberStatus.Up);
                    });
                });

                Cluster.Get(sys2).Leave(ref2.Path.Address);

                Within(TimeSpan.FromSeconds(5), () =>
                {
                    AwaitAssert(() =>
                    {
                        Cluster.Get(sys2).IsTerminated.ShouldBe(true);
                    });
                });
            }
            finally
            {
                Shutdown(sys2);
            }
        }
    }