@Test
public void testStartGtxSpanWhenSpanIsNull() {

    // Setup
    final String name = "name";
    final String gtx = "gtx";
    final String traceId = "4e30f7340b3fb631";
    final Span span = null;
    final Span newGlobalSpan = mock(Span.class);
    when(mockTracer.createSpan(anyString(), any(Span.class))).thenReturn(newGlobalSpan);
    // Run the test
    final Span result = kermossTracerUnderTest.startGtxSpan(name, gtx, traceId, span);
    // Verify the results
    verify(newGlobalSpan, times(1)).tag(anyString(), anyString());
    verify(mockPublisher).publishEvent(any(GtxSpanStarted.class));
    assertEquals(result, newGlobalSpan);
}