public async Task InitializeAndSubmitBadResponse()
        {
            FluentMockServer server = null;

            try
            {
                server = FluentMockServer.Start(new FluentMockServerSettings {
                    Urls = new[] { "http://+:5010" }
                });

                server
                .Given(Request.Create().WithPath("/Query").UsingGet())
                .RespondWith(
                    Response.Create()
                    .WithStatusCode(200)
                    .WithBody(@"{ ""msg"": ""Hello world!"" }")
                    );

                var handler = new PostHandler("http://localhost:5010/");

                var file = Path.GetTempFileName();

                var result = await handler.SubmitQueryHashAsync(file);

                Assert.IsNull(result);
            }
            finally
            {
                server?.Stop();
            }
        }
        public async Task InitializeNullFile()
        {
            var handler = new PostHandler("localhosty");

            var result = await handler.SubmitQueryHashAsync(null);

            Assert.IsNull(result);
        }
        public async Task InitializeNotFoundFile()
        {
            var handler = new PostHandler("localhosty");

            var file = @"c:\tempo\tempy";

            var result = await handler.SubmitQueryHashAsync(file);

            Assert.IsNull(result);
        }
        public async Task InitializeBadHost()
        {
            var handler = new PostHandler("localhosty");

            var file = Path.GetTempFileName();

            var result = await handler.SubmitQueryHashAsync(file);

            Assert.IsNull(result);
        }
        static async Task Main(string[] args)
        {
            var pHandler = new PostHandler("http://localhost:5000/api/");

            for (var x = 0; x < 100; x++)
            {
                var result = await pHandler.SubmitQueryHashAsync(args[0]);

                Console.WriteLine(result.Guid);
            }

            Console.ReadKey();
        }
        public async Task InitializeAndSubmitGoodResponse()
        {
            FluentMockServer server = null;

            try
            {
                server = FluentMockServer.Start(new FluentMockServerSettings {
                    Urls = new[] { "http://+:5010" }
                });

                server
                .Given(Request.Create().WithPath("/Query").UsingPost())
                .RespondWith(
                    Response.Create()
                    .WithStatusCode(200)
                    .WithBody(@"{
                              ""guid"": ""00000000-0000-0000-0000-000000000000"",
                              ""status"": ""SUBMITTED"",
                              ""mD5Hash"": ""12345"",
                              ""errorMessage"": null,
                              ""isMalicious"": false
                            }")
                    );

                var handler = new PostHandler("http://localhost:5010/");

                var file = Path.GetTempFileName();

                var result = await handler.SubmitQueryHashAsync(file);

                Assert.IsNotNull(result);
                Assert.AreEqual(ResponseStatus.SUBMITTED, result.Status);
                Assert.AreEqual("12345", result.MD5Hash);
                Assert.AreEqual(false, result.IsMalicious);
                Assert.AreEqual(Guid.Empty, result.Guid);
                Assert.IsNull(result.ErrorMessage);
            }
            finally
            {
                server?.Stop();
            }
        }