public void EventListeningTest()
        {
            var yc = new YoutubeContext(Url, true) {BaseDirectory = new DirectoryInfo(Path.GetTempPath())};
            var ad = new AudioDownloader(yc);

            var sb = new StringBuilder();

            yc.DownloadFailed += (sender, args) => {
                Debug.WriteLine(args.Subject + "\n" + args.Exception);
                sb.AppendLine(args.Subject + "\n" + args.Exception);
            };

            yc.ProgresStateChanged += (sender, args) => {
                if (args.UIHandled || args.Stage != YoutubeStage.ExtractingAudio)
                    return;
                Debug.Write(args.Precentage.ToString("A###") + " ");
                sb.Append(args.Precentage.ToString("A###") + " ");
                args.UIHandled = true;
            };
            yc.ProgresStateChanged += (sender, args) => {
                if (args.UIHandled || args.Stage != YoutubeStage.Downloading)
                    return;
                Debug.Write(args.Precentage.ToString("D###") + " ");
                sb.Append(args.Precentage.ToString("D###") + " ");
                args.UIHandled = true;
            };

            yc.ProgresStateChanged += (sender, args) => {
                if (args.UIHandled)
                    return;
                Debug.Write($"{{{args.Stage.ToString()}}}");
                sb.Append($"{{{args.Stage.ToString()}}}");
            };

            DownloadUrlResolver.FindHighestAudioQualityDownloadUrl(yc);

            try {
                ad.Execute();
                yc.WaitForThumbnail();
                Assert.IsTrue(File.Exists(yc.AudioPath?.FullName ?? "/"));
                Debug.WriteLine(yc.AudioPath?.FullName ?? "");
            } finally {
                if (yc.AudioPath != null && File.Exists(yc.AudioPath.FullName))
                    File.Delete(yc.AudioPath.FullName);
            }

            var events = Enum.GetValues(typeof(YoutubeStage)).Cast<YoutubeStage>()
                .Where(s =>
                    s != YoutubeStage.DecipheringUrls
                    && s != YoutubeStage.Downloading
                    && s != YoutubeStage.ExtractingAudio
                    && s != YoutubeStage.Undefined
                )
                .Select(ys => $"{{{ys}}}").ToArray();
            var c = sb.ToString();
            foreach (var @event in events)
                Assert.IsTrue(c.Contains(@event), $"c.Contains(YoutubeStage.{@event})");
        }