Наследование: AppController
        static UsersController CreateController(
            GallerySetting settings = null,
            Mock<IFormsAuthenticationService> formsAuthSvc = null,
            Mock<IUserService> userSvc = null,
            Mock<IMessageService> messageSvc = null,
            Mock<IPrincipal> currentUser = null)
        {
            formsAuthSvc = formsAuthSvc ?? new Mock<IFormsAuthenticationService>();
            userSvc = userSvc ?? new Mock<IUserService>();
            var packageService = new Mock<IPackageService>();
            messageSvc = messageSvc ?? new Mock<IMessageService>();
            settings = settings ?? new GallerySetting();

            if (currentUser == null)
            {
                currentUser = new Mock<IPrincipal>();
                currentUser.Setup(u => u.Identity.Name).Returns((string)null);
            }

            var controller = new UsersController(
                userSvc.Object,
                packageService.Object,
                messageSvc.Object,
                settings,
                currentUser.Object);

            TestUtility.SetupHttpContextMockForUrlGeneration(new Mock<HttpContextBase>(), controller);
            return controller;
        }
        private static UsersController CreateController(
            Mock<IConfiguration> config = null,
            Mock<IUserService> userService = null,
            Mock<IMessageService> messageService = null,
            Mock<ICuratedFeedsByManagerQuery> feedsQuery = null,
            Mock<IPrincipal> currentUser = null)
        {
            userService = userService ?? new Mock<IUserService>();
            var packageService = new Mock<IPackageService>();
            messageService = messageService ?? new Mock<IMessageService>();
            config = config ?? new Mock<IConfiguration>();
            feedsQuery = feedsQuery ?? new Mock<ICuratedFeedsByManagerQuery>();

            if (currentUser == null)
            {
                currentUser = new Mock<IPrincipal>();
                currentUser.Setup(u => u.Identity.Name).Returns((string)null);
            }

            var controller = new UsersController(
                feedsQuery.Object,
                userService.Object,
                packageService.Object,
                messageService.Object,
                config.Object,
                currentUser.Object);

            TestUtility.SetupHttpContextMockForUrlGeneration(new Mock<HttpContextBase>(), controller);
            return controller;
        }