### Question:
SimpleSpanProcessor implements SpanProcessor { public static Builder newBuilder(SpanExporter spanExporter) { return new Builder(spanExporter); } private  SimpleSpanProcessor(SpanExporter spanExporter, boolean sampled); @Override void onStart(ReadWriteSpan span); @Override boolean isStartRequired(); @Override void onEnd(ReadableSpan span); @Override boolean isEndRequired(); @Override CompletableResultCode shutdown(); @Override CompletableResultCode forceFlush(); static Builder newBuilder(SpanExporter spanExporter);  }### Answer:
@Test void configTest() { Map<String, String> options = new HashMap<>(); options.put("otel.ssp.export.sampled", "false"); SimpleSpanProcessor.Builder config = SimpleSpanProcessor.newBuilder(spanExporter) .fromConfigMap(options, ConfigTester.getNamingDot()); assertThat(config.getExportOnlySampled()).isEqualTo(false); }
@Test void configTest_EmptyOptions() { SimpleSpanProcessor.Builder config = SimpleSpanProcessor.newBuilder(spanExporter) .fromConfigMap(Collections.emptyMap(), ConfigTester.getNamingDot()); assertThat(config.getExportOnlySampled()) .isEqualTo(SimpleSpanProcessor.Builder.DEFAULT_EXPORT_ONLY_SAMPLED); }
@Test void tracerSdk_NotSampled_Span() { WaitingSpanExporter waitingSpanExporter = new WaitingSpanExporter(1, CompletableResultCode.ofSuccess()); tracerSdkFactory.addSpanProcessor( BatchSpanProcessor.newBuilder(waitingSpanExporter) .setScheduleDelayMillis(MAX_SCHEDULE_DELAY_MILLIS) .build()); TestUtils.startSpanWithSampler(tracerSdkFactory, tracer, SPAN_NAME, Samplers.alwaysOff()) .startSpan() .end(); TestUtils.startSpanWithSampler(tracerSdkFactory, tracer, SPAN_NAME, Samplers.alwaysOff()) .startSpan() .end(); Span span = tracer.spanBuilder(SPAN_NAME).startSpan(); span.end(); List<SpanData> exported = waitingSpanExporter.waitForExport(); assertThat(exported).containsExactly(((ReadableSpan) span).toSpanData()); }