public static ActionContext GetActionContext(params Claim[] claims)
        {
            var authData = new AuthTokenHelper();

            var groups = claims.Where(c => c.Type == ClaimTypes.Groups).Select(c => c.Value).ToArray();

            var headerDictionary = new HeaderDictionary
            {
                { "Authorization", $"Bearer {authData.GetUserToken(null, groups)}" }
            };

            var response = new Mock <HttpResponse>();

            response.SetupGet(r => r.Headers).Returns(headerDictionary);

            var claimsPrincipal = new ClaimsPrincipal(new ClaimsIdentity(authData.GetUserClaims(groups)));

            var httpContext = new Mock <HttpContext>();

            httpContext.SetupGet(a => a.Response).Returns(response.Object);
            httpContext.Setup(a => a.User).Returns(claimsPrincipal);


            var serviceCollectionMock = new Mock <IServiceCollection>();

            var services = new ServiceCollection().AddOptions()
                           .AddAuthenticationCore(o =>
            {
                o.DefaultScheme = "simple";
                o.AddScheme("simple", s => s.HandlerType = typeof(FakeAuthenticationHandler));
            });

            httpContext.SetupGet(a => a.RequestServices).Returns(services.BuildServiceProvider());

            var actionContext = new ActionContext
            {
                HttpContext      = httpContext.Object,
                RouteData        = new RouteData(),
                ActionDescriptor = new ControllerActionDescriptor()
            };

            return(actionContext);
        }