### Question:
ZipkinSpanExporter implements SpanExporter { public static Builder newBuilder() { return new Builder(); } ZipkinSpanExporter(BytesEncoder<Span> encoder, Sender sender, String serviceName); @Override CompletableResultCode export(final Collection<SpanData> spanDataList); @Override CompletableResultCode flush(); @Override CompletableResultCode shutdown(); static Builder newBuilder(); static final String DEFAULT_ENDPOINT; static final String DEFAULT_SERVICE_NAME; }### Answer:
@Test void testCreate() { ZipkinSpanExporter exporter = ZipkinSpanExporter.newBuilder() .setSender(mockSender) .setServiceName("myGreatService") .build(); assertThat(exporter).isNotNull(); }
@Test void configTest() { Map<String, String> options = new HashMap<>(); String serviceName = "myGreatService"; String endpoint = "http: options.put("otel.exporter.zipkin.service.name", serviceName); options.put("otel.exporter.zipkin.endpoint", endpoint); ZipkinSpanExporter.Builder config = ZipkinSpanExporter.newBuilder(); ZipkinSpanExporter.Builder spy = Mockito.spy(config); spy.fromConfigMap(options, ConfigBuilderTest.getNaming()).build(); Mockito.verify(spy).setServiceName(serviceName); Mockito.verify(spy).setEndpoint(endpoint); }