public void shouldHandleMissingParentId() throws Exception {
validateUsingSpan(mockSpan(-123L, 456L, null));
}
private SpanId mockSpan(final long traceId, final long spanId, final Long parentSpanId) {
final SpanId mockedSpan = mock(SpanId.class);
when(mockedSpan.getTraceId()).thenReturn(traceId);
when(mockedSpan.getSpanId()).thenReturn(spanId);
when(mockedSpan.getParentSpanId()).thenReturn(parentSpanId);
return mockedSpan;
}