### Question:
BraveTracerContext implements TracerContext { @SuppressWarnings("unchecked") @Override public <T> T unwrap(final Class<T> clazz) { if (HttpTracing.class.equals(clazz)) { return (T)brave; } else if (Tracing.class.equals(clazz)) { return (T)brave.tracing(); } else if (Tracer.class.equals(clazz)) { return (T)tracer; } else { throw new IllegalArgumentException("The class is '" + clazz + "'not supported and cannot be unwrapped"); } } BraveTracerContext(final HttpTracing brave);  BraveTracerContext(final HttpTracing brave, final 
            Span continuationSpan); @Override @SuppressWarnings("unchecked") TraceScope startSpan(final String description); @Override T continueSpan(final Traceable<T> traceable); @Override Callable<T> wrap(final String description, final Traceable<T> traceable); @Override void annotate(String key, String value); @Override void timeline(String message); @SuppressWarnings("unchecked") @Override T unwrap(final Class<T> clazz);  }### Answer:
@Test public void testUnwrapTracer() { assertThat(context.unwrap(Tracer.class), sameInstance(brave.tracer())); }
@Test public void testUnwrapTracing() { assertThat(context.unwrap(Tracing.class), sameInstance(brave)); }
@Test public void testUnwrapHttpTracing() { assertThat(context.unwrap(HttpTracing.class), sameInstance(httpTracing)); }
@Test(expected = IllegalArgumentException.class) public void testUnwrapUnsupportedClass() { context.unwrap(SpanCustomizer.class); }