public static async Task DatabaseTest_FindAll_Collection3_Sort(NsConnection nsClient)
        {
            var db = await nsClient.GetDatabaseAsync("DatabaseTest_FindAll_Collection3_Sort");

            await db.DeleteCollectionAsync("posts");

            var posts = await db.GetCollectionAsync <Post>("posts");

            await posts.InsertAsync(new Post()
            {
                Title    = "title of post 1",
                Tags     = new[] { "tag1", "tag2" },
                Updated  = DateTime.Now.AddDays(-1),
                Comments = new List <Comment>(new[]
                {
                    new Comment()
                    {
                        Author = new User()
                        {
                            Username = "******"
                        },
                        Content = "comment content",
                        Updated = DateTime.Now.AddDays(-1),
                        Replies = new[]
                        { new Reply()
                          {
                              Author = new User()
                              {
                                  Username = "******"
                              }, Content = "reply to comment"
                          } }
                    }
                })
            });

            await posts.InsertAsync(new Post()
            {
                Title    = "title of post 2",
                Tags     = new[] { "tag2" },
                Updated  = DateTime.Now,
                Comments = new List <Comment>(new[]
                {
                    new Comment()
                    {
                        Author = new User()
                        {
                            Username = "******"
                        },
                        Content = "comment content to post 2",
                        Updated = DateTime.Now,
                        Replies = new[]
                        {
                            new Reply()
                            {
                                Author = new User()
                                {
                                    Username = "******"
                                },
                                Content = "reply to comment of post 2"
                            }
                        }
                    },
                    new Comment()
                    {
                        Author = new User()
                        {
                            Username = "******"
                        },
                        Content = "second comment content to post 2",
                        Replies = new[]
                        {
                            new Reply()
                            {
                                Author = new User()
                                {
                                    Username = "******"
                                },
                                Content = "admin reply to user 2 comment of post 2"
                            }
                        }
                    }
                })
            });

            var query = Query.Query.Eq("Comments.Author.Username", "admin");

            var postFoundCount = await posts.CountAsync(query);

            Assert.AreEqual(2, postFoundCount);

            var postsFound = await posts.FindAsync(query, new[] { new SortDescription("Updated", SortOrder.Descending) });

            Assert.IsNotNull(postsFound);
            Assert.AreEqual(2, postsFound.Count());
            var post = postsFound.First();

            Assert.AreEqual("title of post 2", post.Title);
            Assert.IsNull(post.Description);

            postsFound = await posts.FindAsync(query,
                                               new[] { new SortDescription("Comments.Updated", SortOrder.Ascending) });

            Assert.IsNotNull(postsFound);
            Assert.AreEqual(2, postsFound.Count());
            post = postsFound.First();
            Assert.AreEqual("title of post 1", post.Title);
            Assert.IsNull(post.Description);

            postsFound = await posts.FindAllAsync(SortDescription.OrderById());

            Assert.IsNotNull(postsFound);
            Assert.AreEqual(2, postsFound.Count());

            postsFound = await posts.FindAsync(_ => _.Comments[0].Author.Username == "admin",
                                               SortDescription.OrderBy <Post>(_ => _.Comments[0].Updated));

            Assert.IsNotNull(postsFound);
            Assert.AreEqual(2, postsFound.Count());
            post = postsFound.First();
            Assert.AreEqual("title of post 1", post.Title);
            Assert.IsNull(post.Description);
        }