public IActionResult GetHelpdesks()
        {
            try
            {
                var facade   = new HelpdeskFacade();
                var response = facade.GetHelpdesks();

                switch (response.Status)
                {
                case HttpStatusCode.OK:
                    return(Ok(response));

                case HttpStatusCode.BadRequest:
                    return(BadRequest(BuildBadRequestMessage(response)));

                case HttpStatusCode.InternalServerError:
                    return(StatusCode(StatusCodes.Status500InternalServerError));

                case HttpStatusCode.NotFound:
                    return(NotFound());
                }
                s_logger.Fatal("This code should be unreachable, unknown result has occured.");
            }
            catch (Exception ex)
            {
                s_logger.Error(ex, "Unable to get helpdesks.");
            }
            return(StatusCode(StatusCodes.Status500InternalServerError));
        }
        public Task Execute(IJobExecutionContext context)
        {
            try
            {
                var facade      = new HelpdeskFacade();
                var helpdeskIds = facade.GetHelpdesks().Helpdesks.Select(h => h.HelpdeskID).ToList();

                foreach (int id in helpdeskIds)
                {
                    ForceCheckoutQueueRemoveResponse result = facade.ForceCheckoutQueueRemove(id);
                    if (result.Status != HttpStatusCode.OK)
                    {
                        foreach (StatusMessage message in result.StatusMessages)
                        {
                            s_logger.Error(message);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                s_logger.Error(ex, "Unable to remove queue items and check-ins.");
            }
            return(Task.CompletedTask);
        }
        public void GetHelpdesks()
        {
            var factory = new TestEntityFactory();

            var data = factory.AddHelpdesk(AlphaNumericStringGenerator.GetString(10));

            var facade   = new HelpdeskFacade();
            var response = facade.GetHelpdesks();

            Assert.AreEqual(HttpStatusCode.OK, response.Status);
            Assert.IsTrue(response.Helpdesks.Count > 0);
        }