@Test(expected = EmptyStackException.class)
public void testEndingASpanMoreThanOnce() {

    final SpanSink sink = mock(SpanSink.class);
    SpanSinkRegistry.register(sink);
    Span trace = SpanHelper.startTrace("The Trace");
    trace.end();
    assertTrue(SpanHelper.captureSpans().isEmpty());
    verify(sink).record(trace);
    trace.end();
}