@Test
public void exampleSpan() {

  when(mockTraceService.startSpan(any(String.class))).thenReturn(mockSpan);
  TraceService traceService = new AppEngineTraceService(mockTraceService);
  try (TraceService.Span span = traceService.open("JDBC.Driver#connect")) {
    span.annotate(Label.DATABASE_URL, Optional.of("jdbc:mockdriver"));
    span.annotate(Label.SQL_TEXT, Optional.<String>absent());
  }
  InOrder inOrder = inOrder(mockTraceService, mockSpan);
  inOrder.verify(mockTraceService).startSpan("JDBC.Driver#connect");
  inOrder.verify(mockSpan).setLabel("g.co/jdbc/url", "jdbc:mockdriver");
  inOrder.verify(mockSpan).close();
  verifyNoMoreInteractions(mockTraceService, mockSpan); // No annotation for SQL_TEXT created.
}