@Test
public void testTracingSuccess() {

  final MockSpan span = new MockSpan();
  final Foo delegate = new FooImpl();
  final Foo proxy = TracingProxy.instrument(Foo.class, delegate, tracer);
  when(tracer.spanBuilder("FooImpl.bar")).thenReturn(spanBuilder);
  when(spanBuilder.startSpan()).thenReturn(span);
  proxy.bar();
  verify(tracer).spanBuilder("FooImpl.bar");
  verify(spanBuilder).startSpan();
  assertThat(span.ended, is(true));
  assertThat(span.status, is(nullValue()));
  assertThat(span.annotations, is(empty()));
}