@Test void providesBasicAuthInterceptor_whenDynamicCredentialsConfigured() {
    String credentialsFile = pathOfResource("es-credentials");
    TestPropertyValues.of(
      "zipkin.storage.type:elasticsearch",
      "zipkin.storage.elasticsearch.hosts:127.0.0.1:1234",
      "zipkin.storage.elasticsearch.credentials-file:" + credentialsFile,
      "zipkin.storage.elasticsearch.credentials-refresh-interval:2")
      .applyTo(context);
    Access.registerElasticsearch(context);
    context.refresh();

    HttpClientFactory factory = context.getBean(HttpClientFactory.class);

    WebClient client = WebClient.builder("http://127.0.0.1:1234")
      .option(ClientOptions.DECORATION, factory.options.decoration())
      .build();
    assertThat(client.as(BasicAuthInterceptor.class)).isNotNull();
    BasicCredentials basicCredentials =
      Objects.requireNonNull(client.as(BasicAuthInterceptor.class)).basicCredentials;
    String credentials = basicCredentials.getCredentials();
    assertThat(credentials).isEqualTo("Basic Zm9vOmJhcg==");
  }
Ensures we can wire up network interceptors, such as for logging or authentication
zipkin-server/src/test/java/zipkin2/server/internal/elasticsearch/ZipkinElasticsearchStorageConfigurationTest.java