public async Task Invoke(HttpContext httpContext)
        {
            if (httpContext.Request.Path != endPoint)
            {
                await next.Invoke(httpContext);
            }
            else
            {
                var healthy = await healthCheckService.CheckAsync();

                var code = healthy ? HttpStatusCode.OK : HttpStatusCode.InternalServerError;
                var json = JsonConvert.SerializeObject(healthCheckService.Results);

                await WriteResponseAsync(
                    httpContext,
                    json,
                    "application/json",
                    code);
            }
        }