Akka.Cluster.Tests.ClusterDomainEventPublisherSpec.ClusterDomainEventPublisher_must_publish_leader_changed_when_old_leader_leaves_and_is_removed C# (CSharp) Method

ClusterDomainEventPublisher_must_publish_leader_changed_when_old_leader_leaves_and_is_removed() private method

        public void ClusterDomainEventPublisher_must_publish_leader_changed_when_old_leader_leaves_and_is_removed()
        {
            _publisher.Tell(new InternalClusterAction.PublishChanges(g3));
            _memberSubscriber.ExpectMsg(new ClusterEvent.MemberExited(bExiting));
            _memberSubscriber.ExpectMsg(new ClusterEvent.MemberUp(cUp));
            _publisher.Tell(new InternalClusterAction.PublishChanges(g6));
            _memberSubscriber.ExpectNoMsg(TimeSpan.FromMilliseconds(500));
            _publisher.Tell(new InternalClusterAction.PublishChanges(g7));
            _memberSubscriber.ExpectMsg(new ClusterEvent.MemberExited(aExiting));
            _memberSubscriber.ExpectMsg(new ClusterEvent.LeaderChanged(cUp.Address));
            _memberSubscriber.ExpectNoMsg(TimeSpan.FromMilliseconds(500));
            // at the removed member a an empty gossip is the last thing
            _publisher.Tell(new InternalClusterAction.PublishChanges(Gossip.Empty));
            _memberSubscriber.ExpectMsg(new ClusterEvent.MemberRemoved(aRemoved, MemberStatus.Exiting));
            _memberSubscriber.ExpectMsg(new ClusterEvent.MemberRemoved(bRemoved, MemberStatus.Exiting));
            _memberSubscriber.ExpectMsg(new ClusterEvent.MemberRemoved(cRemoved, MemberStatus.Up));
            //TODO: Null leader stuff is messy. Better approach?
            _memberSubscriber.ExpectMsg(new ClusterEvent.LeaderChanged(null));
        }