InternalPropagation { public abstract TraceContext shallowCopy(TraceContext context);  abstract int flags(SamplingFlags flags); static int sampled(boolean sampled, int flags); abstract TraceContext newTraceContext(
    int flags,
    long traceIdHigh,
    long traceId,
    long localRootId,
    long parentId,
    long spanId,
    List<Object> extra
  ); abstract TraceContext shallowCopy(TraceContext context); abstract TraceContext withExtra(TraceContext context, List<Object> immutableExtra); abstract TraceContext withFlags(TraceContext context, int flags); static final int FLAG_SAMPLED; static final int FLAG_SAMPLED_SET; static final int FLAG_DEBUG; static final int FLAG_SHARED; static final int FLAG_SAMPLED_LOCAL; static final int FLAG_LOCAL_ROOT; static InternalPropagation instance; }
@Test public void shallowCopy() { TraceContext context = TraceContext.newBuilder().traceId(1).spanId(2).debug(true) .extra(Collections.singletonList(1L)).build(); assertThat(InternalPropagation.instance.shallowCopy(context)) .isNotSameAs(context) .usingRecursiveComparison() .isEqualTo(context); }