MockTracer implements Tracer { @Override public <C> SpanContext extract(Format<C> format, C carrier) { return this.propagator.extract(format, carrier); } MockTracer();  MockTracer(ScopeManager scopeManager);  MockTracer(ScopeManager scopeManager, Propagator propagator);  MockTracer(Propagator propagator); synchronized void reset(); synchronized List<MockSpan> finishedSpans(); synchronized Map<String, Map<String, MockSpan>> finishedTraces(); @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 synchronized void close();  }
@Test(expected = RuntimeException.class) public void testBinaryPropagatorExtractError() { MockTracer tracer = new MockTracer(MockTracer.Propagator.BINARY); { BinaryExtract binary = BinaryAdapters.extractionCarrier(ByteBuffer.allocate(4)); tracer.extract(Format.Builtin.BINARY_EXTRACT, binary); } }