public static void SimulateForm(this FakeHttpApplication self, NameValueCollection formData, int responseStatusCode = 200)
 {
     self.SimulateRequest(req =>
     {
         req.SetHttpMethod("POST");
         req.Unvalidated.Form.Clear();
         req.Unvalidated.Form.Add(formData);
     }, () => new FakeHttpResponse()
     {
         StatusCode = responseStatusCode
     });
 }
 public static void SimulateRequest(this FakeHttpApplication self, string httpMethod = "GET", string httpUrl = "https://www.example.org/", int httpStatusCode = 200, int sleepDurationMilliseconds = 0)
 {
     self.SimulateRequest(req =>
     {
         req.SetRawUrl(httpUrl);
         req.SetHttpMethod(httpMethod);
     },
                          () =>
     {
         if (sleepDurationMilliseconds > 0)
         {
             Thread.Sleep(sleepDurationMilliseconds);
         }
         return(new FakeHttpResponse()
         {
             StatusCode = httpStatusCode
         });
     });
 }