public async Task ConvertWhenPathIsNull()
        {
            var bytes = new byte[] { 1 };
            var media = new Plugin.Media.Abstractions.MediaFile(null, () => new MemoryStream(bytes));

            var actual = await media.Convert();

            Assert.NotNull(actual);
            Assert.Null(actual.Extension);
        }
        public async Task ConvertWhenNotExistExtension()
        {
            var bytes = new byte[] { 1 };
            var media = new Plugin.Media.Abstractions.MediaFile("/hoge/foo/bar/image", () => new MemoryStream(bytes));

            var actual = await media.Convert();

            Assert.NotNull(actual);
            Assert.Null(actual.Extension);
        }
        public async Task Convert()
        {
            var bytes = new byte[] { 1 };
            var media = new Plugin.Media.Abstractions.MediaFile("/hoge/foo/bar/image.jpg", () => new MemoryStream(bytes));

            var actual = await media.Convert();

            Assert.NotNull(actual);
            Assert.Equal(".jpg", actual.Extension);

            using (var sourceStream = actual.GetStream())
                using (var memoryStream = new MemoryStream())
                {
                    Assert.NotNull(sourceStream);
                    sourceStream.CopyTo(memoryStream);

                    var actualArray = memoryStream.ToArray();
                    Assert.Equal(1, actualArray.Length);
                    Assert.Equal(bytes[0], actualArray[0]);
                }
        }