### Question:
Transaction extends AbstractSpan<Transaction> { @Override public void resetState() { super.resetState(); context.resetState(); result = null; spanCount.resetState(); type = null; noop = false; maxSpans = 0; frameworkName = null; frameworkVersion = null; } Transaction(ElasticApmTracer tracer); @Override Transaction getTransaction(); Transaction start(TraceContext.ChildContextCreator<T> childContextCreator, @Nullable T parent, long epochMicros,
                                 Sampler sampler, @Nullable ClassLoader initiatingClassLoader); Transaction start(TraceContext.ChildContextCreatorTwoArg<T, A> childContextCreator, @Nullable T parent, A arg,
                                    long epochMicros, Sampler sampler, @Nullable ClassLoader initiatingClassLoader); Transaction startNoop(); @Override TransactionContext getContext(); TransactionContext getContextEnsureVisibility(); Transaction withType(@Nullable String type); @Nullable String getResult(); Transaction withResultIfUnset(@Nullable String result); Transaction withResult(@Nullable String result); void setUser(String id, String email, String username); @Override void beforeEnd(long epochMicros); SpanCount getSpanCount(); KeyListConcurrentHashMap<String, KeyListConcurrentHashMap<String, Timer>> getTimerBySpanTypeAndSubtype(); @Override void resetState(); boolean isNoop(); void ignoreTransaction(); @Nullable String getType(); void addCustomContext(String key, String value); void addCustomContext(String key, Number value); void addCustomContext(String key, Boolean value); @Override String toString(); @Override void incrementReferences(); void setFrameworkName(@Nullable String frameworkName); @Nullable String getFrameworkName(); void setFrameworkVersion(@Nullable String frameworkVersion); @Nullable String getFrameworkVersion(); static final String TYPE_REQUEST; }### Answer:
@Test void resetState() { final Transaction transaction = new Transaction(MockTracer.create()); TransactionUtils.fillTransaction(transaction); transaction.resetState(); assertThat(jsonSerializer.toJsonString(transaction)).isEqualTo(jsonSerializer.toJsonString(new Transaction(MockTracer.create()))); }