GlobalTracer implements Tracer { public static boolean isRegistered() { return isRegistered; } private  GlobalTracer(); static Tracer get(); static boolean isRegistered(); static synchronized boolean registerIfAbsent(final Callable<Tracer> provider); static synchronized boolean registerIfAbsent(final Tracer tracer); @Deprecated static void register(final Tracer tracer); @Override ScopeManager scopeManager(); @Override SpanBuilder buildSpan(String operationName); @Override void inject(SpanContext spanContext, Format<C> format, C carrier); @Override SpanContext extract(Format<C> format, C carrier); @Override Span activeSpan(); @Override Scope activateSpan(Span span); @Override void close(); @Override String toString();  }
@Test public void testIsRegistered() { assertThat("Should not be registered", GlobalTracer.isRegistered(), is(false)); GlobalTracer.register(mock(Tracer.class)); assertThat("Should be registered", GlobalTracer.isRegistered(), is(true)); }