public void MiningNodeWithOneConnectionAlwaysSynced()
        {
            const string miner          = "miner";
            const string connector      = "connector";
            const string node1          = "networkNode1";
            const string node2          = "networkNode2";
            const string walletName     = "dummyWallet";
            const string walletPassword = "******";

            var    sharedSteps    = new SharedSteps();
            string testFolderPath = Path.Combine(this.GetType().Name, nameof(MiningNodeWithOneConnectionAlwaysSynced));

            using (var builder = new NodeGroupBuilder(testFolderPath))
            {
                var nodes = builder.StratisPowNode(miner).Start().NotInIBD().WithWallet(walletName, walletPassword)
                            .StratisPowNode(connector).Start().NotInIBD().WithWallet(walletName, walletPassword)
                            .StratisPowNode(node1).Start().NotInIBD().WithWallet(walletName, walletPassword)
                            .StratisPowNode(node2).Start().NotInIBD().WithWallet(walletName, walletPassword)
                            .WithConnections()
                            .Connect(miner, connector)
                            .Connect(connector, node1).Connect(connector, node2)
                            .Connect(node1, node2)
                            .AndNoMoreConnections().Build();

                nodes.Values.ToList().ForEach(n =>
                {
                    sharedSteps.MineBlocks(1, n, "account 0", walletName, walletPassword);
                    sharedSteps.WaitForNodeToSync(nodes.Values.ToArray());
                });

                int networkHeight = nodes[miner].FullNode.Chain.Height;
                Assert.Equal(networkHeight, nodes.Count);

                // Random node on network generates a block.
                nodes[node1].GenerateStratisWithMiner(1);

                // Wait until connector get the hash of network's block.
                while ((nodes[connector].FullNode.ChainBehaviorState.ConsensusTip.HashBlock != nodes[node1].FullNode.ChainBehaviorState.ConsensusTip.HashBlock) ||
                       (nodes[node1].FullNode.ChainBehaviorState.ConsensusTip.Height == networkHeight))
                {
                    Thread.Sleep(1);
                }

                Assert.Equal(nodes[connector].FullNode.Chain.Tip.HashBlock, nodes[node1].FullNode.Chain.Tip.HashBlock);
                Assert.Equal(nodes[miner].FullNode.Chain.Tip.Height, networkHeight);
                Assert.Equal(nodes[connector].FullNode.Chain.Tip.Height, networkHeight + 1);

                // Miner mines the block.
                nodes[miner].GenerateStratisWithMiner(1);
                TestHelper.WaitLoop(() => TestHelper.IsNodeSynced(nodes[miner]));

                networkHeight++;

                Assert.Equal(nodes[connector].FullNode.Chain.Tip.HashBlock, nodes[node1].FullNode.Chain.Tip.HashBlock);
                Assert.Equal(nodes[miner].FullNode.Chain.Tip.Height, networkHeight);
                Assert.Equal(nodes[connector].FullNode.Chain.Tip.Height, networkHeight);

                nodes[connector].GenerateStratisWithMiner(1);
                networkHeight++;

                sharedSteps.WaitForNodeToSync(nodes.Values.ToArray());

                nodes.Values.All(n => n.FullNode.Chain.Height == networkHeight).Should()
                .BeTrue(because: "all nodes have synced to chain height");

                Assert.Equal(nodes[node1].FullNode.Chain.Tip.HashBlock, nodes[miner].FullNode.Chain.Tip.HashBlock);
            }
        }