public WebHookFiltersControllerTests() { WildcardWebHookFilterProvider provider = new WildcardWebHookFilterProvider(); _filterManager = new WebHookFilterManager(new[] { provider }); _resolverMock = new Mock<IDependencyResolver>(); _resolverMock.Setup(r => r.GetService(typeof(IWebHookFilterManager))) .Returns(_filterManager) .Verifiable(); _config = new HttpConfiguration(); _config.DependencyResolver = _resolverMock.Object; HttpControllerContext controllerContext = new HttpControllerContext() { Configuration = _config, Request = new HttpRequestMessage(), }; _controller = new WebHookFiltersController(); _controller.ControllerContext = controllerContext; }