### Question:
TracerShim extends BaseShimObject implements Tracer { @Override public <C> void inject(SpanContext context, Format<C> format, C carrier) { if (context == null) { logger.log(Level.INFO, "Cannot inject a null span context."); return; } SpanContextShim contextShim = getContextShim(context); if (format == Format.Builtin.TEXT_MAP || format == Format.Builtin.TEXT_MAP_INJECT || format == Format.Builtin.HTTP_HEADERS) { propagation.injectTextMap(contextShim, (TextMapInject) carrier); } } TracerShim(TelemetryInfo telemetryInfo); @Override ScopeManager scopeManager(); @Override Span activeSpan(); @Override Scope activateSpan(Span span); @Override SpanBuilder buildSpan(String operationName); @Override void inject(SpanContext context, Format<C> format, C carrier); @SuppressWarnings("ReturnMissingNullable") @Override SpanContext extract(Format<C> format, C carrier); @Override void close();  }### Answer:
@Test void inject_nullContext() { Map<String, String> map = new HashMap<>(); tracerShim.inject(null, Format.Builtin.TEXT_MAP, new TextMapAdapter(map)); assertEquals(0, map.size()); }