public static bool Check <TItem>
        (
            Page <TItem> expected,
            CollectionPageViewModel <TItem> actual,
            Func <TItem, TItem, bool> equal
        )
            where TItem : class, IEntity
        {
            var pagingText      = PagingTextCalculator.Calculate(expected.Skip, expected.Take, expected.TotalCount);
            var hasForwardPages = expected.TotalCount > expected.Skip + expected.Take;
            var hasBackPages    = expected.Skip > 0;
            var isPaging        = expected.TotalCount > expected.Take;
            var result          =
                expected.Items.Count == actual.Items.Count &&
                pagingText == actual.PagingText &&
                hasForwardPages == actual.HasForwardPages &&
                hasBackPages == actual.HasBackPages &&
                isPaging == actual.IsPaging;

            if (result)
            {
                for (var i = 0; i < expected.Items.Count; i++)
                {
                    if (!equal(expected.Items[i], actual.Items[i]))
                    {
                        result = false;
                        break;
                    }
                }
            }
            return(result);
        }
        public void OnFirstPage()
        {
            var items = new List <Uom>().ToImmutableList();
            var links = new PageLinksFormatter().GetLinks(Url, new Page <Uom>("", 200, 0, 50, new List <Uom>()));
            var expectedPagingText = PagingTextCalculator.Calculate(0, 50, 200);
            var data = new CollectionPageData <Uom>(items, links);

            Assert.IsTrue(data.IsPaging);
            Assert.AreEqual(4, data.Links.Count);

            data.Links.TryGetValue(RelTypes.self, out var selfUrl);
            data.Links.TryGetValue(RelTypes.first, out var firstUrl);
            data.Links.TryGetValue(RelTypes.next, out var nextUrl);
            data.Links.TryGetValue(RelTypes.last, out var lastUrl);
            Assert.AreEqual($"{Url}?searchText=&skip=0&take=50", selfUrl);
            Assert.AreEqual($"{Url}?searchText=&skip=0&take=50", firstUrl);
            Assert.AreEqual($"{Url}?searchText=&skip=50&take=50", nextUrl);
            Assert.AreEqual($"{Url}?searchText=&skip=150&take=50", lastUrl);

            Assert.AreEqual(expectedPagingText, data.PagingText);
        }