### Question:
TracezDataAggregator { Set<String> getSpanNames() { Set<String> spanNames = new TreeSet<>(); Collection<ReadableSpan> allRunningSpans = spanProcessor.getRunningSpans(); for (ReadableSpan span : allRunningSpans) { spanNames.add(span.getName()); } spanNames.addAll(spanProcessor.getCompletedSpanCache().keySet()); return spanNames; } TracezDataAggregator(TracezSpanProcessor spanProcessor);   }### Answer:
@Test void getSpanNames_noSpans() { assertThat(dataAggregator.getSpanNames()).isEmpty(); }
@Test void getSpanNames_twoSpanNames() { Span span1 = tracer.spanBuilder(SPAN_NAME_ONE).startSpan(); Span span2 = tracer.spanBuilder(SPAN_NAME_TWO).startSpan(); Span span3 = tracer.spanBuilder(SPAN_NAME_TWO).startSpan(); Set<String> names = dataAggregator.getSpanNames(); assertThat(names).containsExactly(SPAN_NAME_ONE, SPAN_NAME_TWO); span1.end(); span2.end(); span3.end(); names = dataAggregator.getSpanNames(); assertThat(names).containsExactly(SPAN_NAME_ONE, SPAN_NAME_TWO); }