### Question:
SpanBuilder implements Tracer.SpanBuilder { @Override public io.opentracing.Span start() { if (tracer.isDisabled()) { return NoopSpan.INSTANCE; } long startTimestampRelativeNanos = -1; if (startTimestampMicros == 0) { startTimestampRelativeNanos = System.nanoTime(); startTimestampMicros = Util.nowMicrosApproximate(); } grpcSpan.setOperationName(operationName); grpcSpan.setStartTimestamp(Util.epochTimeMicrosToProtoTime(startTimestampMicros)); Long traceId = this.traceId; Map<String, String> baggage = null; if(parent == null && !ignoringActiveSpan) { parent = activeSpanContext(); this.asChildOf(parent); } if (parent != null) { traceId = parent.getTraceId(); baggage = new HashMap<String, String>(parent.getBaggage()); } SpanContext newSpanContext = new SpanContext(traceId, spanId, baggage); grpcSpan.setSpanContext(newSpanContext.getInnerSpanCtx()); Span span = new Span(tracer, newSpanContext, grpcSpan, startTimestampRelativeNanos); for (Map.Entry<String, String> pair : stringTags.entrySet()) { span.setTag(pair.getKey(), pair.getValue()); } for (Map.Entry<String, Boolean> pair : boolTags.entrySet()) { span.setTag(pair.getKey(), pair.getValue()); } for (Map.Entry<String, Number> pair : numTags.entrySet()) { span.setTag(pair.getKey(), pair.getValue()); } return span; } SpanBuilder(String operationName, AbstractTracer tracer); @Override Tracer.SpanBuilder asChildOf(io.opentracing.SpanContext parent); @Override Tracer.SpanBuilder asChildOf(io.opentracing.Span parent); @Override Tracer.SpanBuilder addReference(String type, io.opentracing.SpanContext referredTo); @Override Tracer.SpanBuilder ignoreActiveSpan(); Tracer.SpanBuilder withTag(String key, String value); Tracer.SpanBuilder withTag(String key, boolean value); Tracer.SpanBuilder withTag(String key, Number value); Tracer.SpanBuilder withTag(io.opentracing.tag.Tag<T> tag, T value); Tracer.SpanBuilder withStartTimestamp(long microseconds); @SuppressWarnings({"WeakerAccess", "UnusedReturnValue", "SameParameterValue"}) Tracer.SpanBuilder withTraceIdAndSpanId(long traceId, long spanId); @SuppressWarnings("WeakerAccess") Iterable<Map.Entry<String, String>> baggageItems(); @Override io.opentracing.Span start();  }### Answer:
@Test public void testStart_isDisabled() { when(tracer.isDisabled()).thenReturn(true); io.opentracing.Span result = undertest.start(); assertSame(NoopSpan.INSTANCE, result); }
@Test public void testStart_noStartTimeProvided() { io.opentracing.Span otSpan = undertest.start(); assertNotNull(otSpan); assertTrue(otSpan instanceof Span); Span lsSpan = (Span) otSpan; assertTrue(lsSpan.getStartTimestampRelativeNanos() + " was not greater than zero", lsSpan.getStartTimestampRelativeNanos() > 0); assertTrue(lsSpan.getGrpcSpan().getStartTimestamp() + " was not greater than zero", Util.protoTimeToEpochMicros(lsSpan.getGrpcSpan().getStartTimestamp()) > 0); verifyResultingSpan(lsSpan); }