public void Start() { _configuration = new HttpSelfHostConfiguration(TestConstants.BaseUrl); WebApiConfig.Register(Configuration); _sniffer = new CaptureMessagesDelegatingHandler(); _configuration.MessageHandlers.Insert(0, _sniffer); _server = new HttpSelfHostServer(Configuration); _server.OpenAsync().Wait(); // yeah this looks bad ... :) }