  @Test
  public void shouldBeConfigurable() throws IOException {

    ObjectMapper mapper =
        new ObjectMapper(new YAMLFactory()).setSubtypeResolver(new DiscoverableSubtypeResolver());

    final ZipkinFactory factory =
        mapper.readValue(
            "enabled: true\n"
                + "collector: http\n"
                + "baseUrl: http://example.com:1234/zipkin\n"
                + "connectTimeout: 1d\n"
                + "readTimeout: 2d\n"
                + "reportTimeout: 3d\n",
            ZipkinFactory.class);
    assertThat(factory).isInstanceOf(HttpZipkinFactory.class);
    HttpZipkinFactory httpFactory = (HttpZipkinFactory) factory;
    assertThat(httpFactory.getBaseUrl()).isEqualTo("http://example.com:1234/zipkin");
    assertThat(httpFactory.getReportTimeout()).isEqualTo(Duration.days(3));
  }