### Question:
Span implements io.opentracing.Span { public Span setComponentName(String componentName) { if (componentName == null) { tracer.debug("componentName is null, ignoring"); return this; } return setTag(LightStepConstants.Tags.COMPONENT_NAME_KEY, componentName); } Span(AbstractTracer tracer, SpanContext context, Builder grpcSpan, long startTimestampRelativeNanos); @Override SpanContext context(); @Override void finish(); @Override void finish(long finishTimeMicros); @Override Span setTag(String key, String value); @Override Span setTag(String key, boolean value); @Override Span setTag(String key, Number value); @Override Span setTag(io.opentracing.tag.Tag<T> tag, T value); @Override synchronized String getBaggageItem(String key); @Override synchronized Span setBaggageItem(String key, String value); synchronized Span setOperationName(String operationName); Span setComponentName(String componentName); @SuppressWarnings("WeakerAccess") void close(); AbstractTracer getTracer(); final Span log(Map<String, ?> fields); @Override final Span log(long timestampMicros, Map<String, ?> fields); @Override Span log(String message); @Override Span log(long timestampMicroseconds, String message); @SuppressWarnings("WeakerAccess") String generateTraceURL(); @SuppressWarnings("WeakerAccess") Builder getGrpcSpan();  }### Answer:
@Test public void testSetComponentName() { Span result = undertest.setComponentName("custom"); assertSame(result, undertest); verifyZeroInteractions(abstractTracer); assertNotNull(grpcSpan.getTagsList()); assertEquals(1, grpcSpan.getTagsCount()); assertEquals(KeyValue.newBuilder().setKey(LightStepConstants.Tags.COMPONENT_NAME_KEY).setStringValue("custom").build(), grpcSpan.getTags(0)); }
@Test public void testSetComponentName_withNullValue() { Span result = undertest.setComponentName(null); assertSame(result, undertest); verify(abstractTracer).debug("componentName is null, ignoring"); verifyZeroInteractions(abstractTracer); }