### Question:
Span extends AbstractSpan<Span> implements Recyclable { @Override public void resetState() { super.resetState(); context.resetState(); stacktrace = null; type = null; subtype = null; action = null; parent = null; transaction = null; stackFrames = null; } Span(ElasticApmTracer tracer); void setNonDiscardable(); Span start(TraceContext.ChildContextCreator<T> childContextCreator, T parentContext, long epochMicros); @Override SpanContext getContext(); Span withType(@Nullable String type); Span withSubtype(@Nullable String subtype); Span withAction(@Nullable String action); @Deprecated void setType(@Nullable String type, @Nullable String subtype, @Nullable String action); @Nullable Throwable getStacktrace(); @Nullable String getType(); @Nullable String getSubtype(); @Nullable String getAction(); @Override void beforeEnd(long epochMicros); @Override void resetState(); @Override String toString(); Span withStacktrace(Throwable stacktrace); @Override void incrementReferences(); @Override void decrementReferences(); void setStackTrace(List<StackFrame> stackTrace); @Nullable List<StackFrame> getStackFrames(); @Nullable @Override Transaction getTransaction(); @Nullable AbstractSpan<?> getParent(); static final long MAX_LOG_INTERVAL_MICRO_SECS; }### Answer:
@Test void resetState() { Span span = new Span(MockTracer.create()) .withName("SELECT FROM product_types") .withType("db") .withSubtype("postgresql") .withAction("query"); span.getContext().getDb() .withInstance("customers") .withStatement("SELECT * FROM product_types WHERE user_id=?") .withType("sql") .withUser("readonly_user"); span.resetState(); assertThat(span.getContext().hasContent()).isFalse(); assertThat(span.getNameAsString()).isNullOrEmpty(); assertThat(span.getType()).isNull(); assertThat(span.getSubtype()).isNull(); assertThat(span.getAction()).isNull(); }