private HttpClient CreateApiClient(TestApplicabilityCheck applies)
        {
            var testApi = new PeakyService(targets =>
                                           targets.Add("staging",
                                                       "widgetapi",
                                                       new Uri("http://staging.widgets.com"),
                                                       dependencies =>
                                                       dependencies
                                                       .Register(() => applies)),
                                           testTypes: new[] { typeof(TestsConstrainedToTarget) });

            disposables.Add(testApi);

            return(testApi.CreateHttpClient());
        }
 public TestsConstrainedToTarget(HttpClient httpClient, TestApplicabilityCheck applies)
 {
     this.httpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient));
     this.applies    = applies;
 }