@Test
public void testtraceWhenParentNull(){

    // Setup
    final RequestGlobalTransaction rgt = mock(RequestGlobalTransaction.class);
    final String traceId = "traceId";
    when(rgt.getTraceId()).thenReturn(traceId);
    when(rgt.getParent()).thenReturn("parent");
    // Run the test
    String result = businessGlobalTransactionServiceImplUnderTest.trace(rgt);
    // Verify the results
    assertEquals(result, traceId);
    verify(mockTracer, never()).createSpan(anyString());
    verify(mockPublisher, never()).publishEvent(any(GtxSpanStarted.class));
}