<C extends ProcessingContext> Span nextSpan(C context, Headers headers) {
    TraceContextOrSamplingFlags extracted = extractor.extract(headers);
    // Clear any propagation keys present in the headers
    if (!extracted.equals(emptyExtraction)) {
      clearHeaders(headers);
    }
    Span result = tracer.nextSpan(extracted);
    if (!result.isNoop()) {
      addTags(context, result);
    }
    return result;
  }
@Test void nextSpan_uses_current_context() {
    ProcessorContext<String, String> fakeProcessorContext = processorV2ContextSupplier.get();
    Span child;
    try (Scope scope = tracing.currentTraceContext().newScope(parent)) {
      child = kafkaStreamsTracing.nextSpan(fakeProcessorContext, new RecordHeaders());
    }
    child.finish();

    assertThat(child.context().parentIdString()).isEqualTo(parent.spanIdString());
  }