### Question:
InMemorySpanExporter implements SpanExporter { public List<SpanData> getFinishedSpanItems() { synchronized (this) { return Collections.unmodifiableList(new ArrayList<>(finishedSpanItems)); } } private  InMemorySpanExporter(); static InMemorySpanExporter create(); List<SpanData> getFinishedSpanItems(); void reset(); @Override CompletableResultCode export(Collection<SpanData> spans); @Override CompletableResultCode flush(); @Override CompletableResultCode shutdown();  }### Answer:
@Test void getFinishedSpanItems() { tracer.spanBuilder("one").startSpan().end(); tracer.spanBuilder("two").startSpan().end(); tracer.spanBuilder("three").startSpan().end(); List<SpanData> spanItems = exporter.getFinishedSpanItems(); assertThat(spanItems).isNotNull(); assertThat(spanItems.size()).isEqualTo(3); assertThat(spanItems.get(0).getName()).isEqualTo("one"); assertThat(spanItems.get(1).getName()).isEqualTo("two"); assertThat(spanItems.get(2).getName()).isEqualTo("three"); }