    @Test
    public void testLocalSpan() throws Exception {

        {
            router.route("/localSpan").handler(routingContext -> {
                SpanContext serverSpanContext = TracingHandler.serverSpanContext(routingContext);
                io.opentracing.Tracer.SpanBuilder spanBuilder = mockTracer.buildSpan("localSpan");

                spanBuilder.asChildOf(serverSpanContext)
                        .start()
                        .finish();

                routingContext.response()
                        .setStatusCode(202)
                        .end();
            });

            request("/localSpan", HttpMethod.GET, 202);
            Awaitility.await().until(reportedSpansSize(), IsEqual.equalTo(2));
        }
        List<MockSpan> mockSpans = mockTracer.finishedSpans();
        Assert.assertEquals(2, mockSpans.size());

        Assert.assertEquals(mockSpans.get(0).parentId(), mockSpans.get(1).context().spanId());
        Assert.assertEquals(mockSpans.get(0).context().traceId(), mockSpans.get(1).context().traceId());
    }