public async Task Get_DiscardedBranch_Test()
        {
            var chain = await _fullBlockchainService.GetChainAsync();

            {
                //         LIB height: 5
                //
                //             Height: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10 -> 11 -> 12 -> 13 -> 14
                //        Best Branch: a -> b -> c -> d -> e -> f -> g -> h -> i -> j  -> k
                //     Longest Branch:                                   (h)-> l -> m  -> n  -> o  -> p
                //        Fork Branch:                    (e)-> q -> r -> s -> t -> u
                //    Unlinked Branch:                                              v  -> w  -> x  -> y  -> z
                var discardedBranch = await _fullBlockchainService.GetDiscardedBranchAsync(chain);

                discardedBranch.BranchKeys.Count.ShouldBe(0);
                discardedBranch.NotLinkedKeys.Count.ShouldBe(0);
            }

            {
                //         LIB height: 7
                //
                //             Height: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10 -> 11 -> 12 -> 13 -> 14
                //        Best Branch: a -> b -> c -> d -> e -> f -> g -> h -> i -> j  -> k
                //     Longest Branch:                                   (h)-> l -> m  -> n  -> o  -> p
                //        Fork Branch:                    (e)-> q -> r -> s -> t -> u
                //    Unlinked Branch:                                              v  -> w  -> x  -> y  -> z
                await _fullBlockchainService.SetIrreversibleBlockAsync(chain, _kernelTestHelper.BestBranchBlockList[6]
                                                                       .Height, _kernelTestHelper.BestBranchBlockList[6].GetHash());

                chain = await _fullBlockchainService.GetChainAsync();

                var discardedBranch = await _fullBlockchainService.GetDiscardedBranchAsync(chain);

                discardedBranch.BranchKeys.Count.ShouldBe(1);
                discardedBranch.BranchKeys[0]
                .ShouldBe(_kernelTestHelper.ForkBranchBlockList.Last().GetHash().ToStorageKey());

                discardedBranch.NotLinkedKeys.Count.ShouldBe(0);
            }

            {
                //         LIB height: 9
                //
                //             Height: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10 -> 11 -> 12 -> 13 -> 14
                //        Best Branch: a -> b -> c -> d -> e -> f -> g -> h -> i -> j  -> k
                //     Longest Branch:                                   (h)-> l -> m  -> n  -> o  -> p
                //        Fork Branch: (-)                (e)-> q -> r -> s -> t -> u
                //    Unlinked Branch:                                              v  -> w  -> x  -> y  -> z
                await _fullBlockchainService.SetIrreversibleBlockAsync(chain, _kernelTestHelper.BestBranchBlockList[8]
                                                                       .Height, _kernelTestHelper.BestBranchBlockList[8].GetHash());

                chain = await _fullBlockchainService.GetChainAsync();

                var discardedBranch = await _fullBlockchainService.GetDiscardedBranchAsync(chain);

                discardedBranch.BranchKeys.Count.ShouldBe(2);
                discardedBranch.BranchKeys
                .ShouldContain(_kernelTestHelper.ForkBranchBlockList.Last().GetHash().ToStorageKey());
                discardedBranch.BranchKeys
                .ShouldContain(_kernelTestHelper.LongestBranchBlockList.Last().GetHash().ToStorageKey());

                discardedBranch.NotLinkedKeys.Count.ShouldBe(0);
            }

            {
                //         LIB height: 10
                //
                //             Height: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10 -> 11 -> 12 -> 13 -> 14
                //        Best Branch: a -> b -> c -> d -> e -> f -> g -> h -> i -> j  -> k
                //     Longest Branch: (-)                               (h)-> l -> m  -> n  -> o  -> p
                //        Fork Branch: (-)                (e)-> q -> r -> s -> t -> u
                //    Unlinked Branch:                                              v  -> w  -> x  -> y  -> z
                await _fullBlockchainService.SetIrreversibleBlockAsync(chain, _kernelTestHelper.BestBranchBlockList[9]
                                                                       .Height, _kernelTestHelper.BestBranchBlockList[9].GetHash());

                chain = await _fullBlockchainService.GetChainAsync();

                var discardedBranch = await _fullBlockchainService.GetDiscardedBranchAsync(chain);

                discardedBranch.BranchKeys.Count.ShouldBe(2);
                discardedBranch.BranchKeys
                .ShouldContain(_kernelTestHelper.ForkBranchBlockList.Last().GetHash().ToStorageKey());
                discardedBranch.BranchKeys
                .ShouldContain(_kernelTestHelper.LongestBranchBlockList.Last().GetHash().ToStorageKey());

                discardedBranch.NotLinkedKeys.Count.ShouldBe(1);
                discardedBranch.NotLinkedKeys.ShouldContain(_kernelTestHelper.NotLinkedBlockList[0].Header
                                                            .PreviousBlockHash.ToStorageKey());
            }

            {
                //         LIB height: 11
                //
                //             Height: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10 -> 11 -> 12 -> 13 -> 14
                //        Best Branch: a -> b -> c -> d -> e -> f -> g -> h -> i -> j  -> k
                //     Longest Branch: (-)                               (h)-> l -> m  -> n  -> o  -> p
                //        Fork Branch: (-)                (e)-> q -> r -> s -> t -> u
                //    Unlinked Branch:                                             v(-) -> w  -> x  -> y  -> z
                await _fullBlockchainService.SetIrreversibleBlockAsync(chain, _kernelTestHelper.BestBranchBlockList[10]
                                                                       .Height, _kernelTestHelper.BestBranchBlockList[10].GetHash());

                chain = await _fullBlockchainService.GetChainAsync();

                var discardedBranch = await _fullBlockchainService.GetDiscardedBranchAsync(chain);

                discardedBranch.BranchKeys.Count.ShouldBe(2);
                discardedBranch.BranchKeys
                .ShouldContain(_kernelTestHelper.ForkBranchBlockList.Last().GetHash().ToStorageKey());
                discardedBranch.BranchKeys
                .ShouldContain(_kernelTestHelper.LongestBranchBlockList.Last().GetHash().ToStorageKey());

                discardedBranch.NotLinkedKeys.Count.ShouldBe(2);
                discardedBranch.NotLinkedKeys.ShouldContain(_kernelTestHelper.NotLinkedBlockList[0].Header
                                                            .PreviousBlockHash.ToStorageKey());
                discardedBranch.NotLinkedKeys.ShouldContain(_kernelTestHelper.NotLinkedBlockList[1].Header
                                                            .PreviousBlockHash.ToStorageKey());
            }
        }