public async Task CopyToAsync() { var bytes = new byte[] { 10, 10 }; var writer = new FastMemoryWriter(); writer.Write(bytes); writer.Seek(0, SeekOrigin.Begin); var stream = new MemoryStream(); await writer.CopyToAsync(stream); var result = stream.ToArray(); Assert.Equal(bytes, result); }