APIConfig extends Config { public <T> APIClientConfig client(Class<T> serviceInterface, String serviceURL) { T client = createClient(serviceInterface, serviceURL); context.beanFactory.bind(serviceInterface, null, client); return new APIClientConfig((WebServiceClientProxy) client); }  void service(Class<T> serviceInterface, T service); APIClientConfig client(Class<T> serviceInterface, String serviceURL); T createClient(Class<T> serviceInterface, String serviceURL); HTTPClientBuilder httpClient(); void publishAPI(List<String> cidrs);  }
@Test void client() { config.httpClient().timeout(Duration.ofSeconds(5)); config.client(TestWebService.class, "http: TestWebService client = (TestWebService) config.context.beanFactory.bean(TestWebService.class, null); assertThat(client).isNotNull(); }