public static async Task MemoryDTO2()
        {
            byte[] content          = { 1, 2, 3 };
            IDataTransferObject dto = new BinaryTransferObject(content);

            Equal(3L, dto.Length);
            True(dto.IsReusable);
            var writer = new ArrayBufferWriter <byte>();
            await dto.WriteToAsync(writer);

            Equal(3, writer.WrittenCount);
            Equal(content, writer.WrittenSpan.ToArray());
        }
        public static async Task MemoryDTO()
        {
            byte[] content          = { 1, 2, 3 };
            IDataTransferObject dto = new BinaryTransferObject(content);

            Equal(3L, dto.Length);
            True(dto.IsReusable);
            using var ms = new MemoryStream();
            await dto.WriteToAsync(ms);

            Equal(3, ms.Length);
            Equal(content, ms.ToArray());
            Equal(content, await dto.ToByteArrayAsync());
        }
        public static async Task MemoryDTO3()
        {
            IDataTransferObject dto = new BinaryTransferObject <long> {
                Content = 42L
            };

            Equal(sizeof(long), dto.Length);
            True(dto.IsReusable);
            var writer = new ArrayBufferWriter <byte>();
            await dto.WriteToAsync(writer);

            Equal(sizeof(long), writer.WrittenCount);
            Equal(42L, BitConverter.ToInt64(writer.WrittenSpan));
        }
        public static async Task MemoryDTO()
        {
            IDataTransferObject dto = new BinaryTransferObject(new byte[] { 1, 2, 3 });

            Equal(3L, dto.Length);
            True(dto.IsReusable);
            using var ms = new MemoryStream();
            await dto.WriteToAsync(ms);

            Equal(3, ms.Length);
            var bytes = await dto.ToByteArrayAsync();

            Equal(1, bytes[0]);
            Equal(2, bytes[1]);
            Equal(3, bytes[2]);
        }