@Test public void should_prefer_current_span() {

  // Will be either a bug, or a missing processor stage which can result in an old span in headers
  Message message = MessageBuilder.withBody(new byte[0]).build();
  message.getMessageProperties().setHeader("b3", B3SingleFormat.writeB3SingleFormat(grandparent));
  Message postProcessMessage;
  try (Scope scope = tracing.currentTraceContext().newScope(parent)) {
    postProcessMessage = tracingMessagePostProcessor.postProcessMessage(message);
  }
  assertThat(spans.get(0).parentId()).isEqualTo(parent.spanIdString());
  Map<String, Object> headers = postProcessMessage.getMessageProperties().getHeaders();
  assertThat(headers.get("b3").toString()).endsWith("-" + spans.get(0).id() + "-1");
}