@Override
    public void maybeExport(Supplier<TraceDescription> traceDescriptionSupplier) {
        if (samplingStrategy.shouldSample()) {
            wrappedExporter.maybeExport(traceDescriptionSupplier);
        }
    }
@Test
    void sampling_decision_is_deferred_to_provided_sampler() {
        var exporter = mock(TraceExporter.class);
        var sampler = mock(SamplingStrategy.class);
        when(sampler.shouldSample()).thenReturn(true, false);
        var samplingExporter = new SamplingTraceExporter(exporter, sampler);

        samplingExporter.maybeExport(() -> new TraceDescription(null, ""));
        verify(exporter, times(1)).maybeExport(any());

        samplingExporter.maybeExport(() -> new TraceDescription(null, ""));
        verify(exporter, times(1)).maybeExport(any()); // No further invocations since last
    }