### Question:
SpanDataBuilder implements SpanData { public static SpanDataBuilder.Builder newBuilder(SpanData spanData) { return new AutoValue_SpanDataBuilder.Builder() .setTraceId(spanData.getTraceId()) .setSpanId(spanData.getSpanId()) .setSampled(spanData.isSampled()) .setTraceState(spanData.getTraceState()) .setParentSpanId(spanData.getParentSpanId()) .setResource(spanData.getResource()) .setInstrumentationLibraryInfo(spanData.getInstrumentationLibraryInfo()) .setName(spanData.getName()) .setKind(spanData.getKind()) .setStartEpochNanos(spanData.getStartEpochNanos()) .setAttributes(spanData.getAttributes()) .setEvents(spanData.getEvents()) .setLinks(spanData.getLinks()) .setStatus(spanData.getStatus()) .setEndEpochNanos(spanData.getEndEpochNanos()) .setHasRemoteParent(spanData.getHasRemoteParent()) .setHasEnded(spanData.getHasEnded()) .setTotalRecordedEvents(spanData.getTotalRecordedEvents()) .setTotalRecordedLinks(spanData.getTotalRecordedLinks()) .setTotalAttributeCount(spanData.getTotalAttributeCount()); }  static SpanDataBuilder.Builder newBuilder(SpanData spanData); final SpanDataBuilder.Builder toBuilder(); @SuppressWarnings("EqualsHashCode") @Override final boolean equals(Object o);  }### Answer:
@Test void noOp() { assertThat(SpanDataBuilder.newBuilder(TEST_SPAN_DATA).build()) .isEqualToComparingFieldByField(TEST_SPAN_DATA); }
@Test void modifySpanData() { assertThat(TEST_SPAN_DATA.getStatus()).isEqualTo(Status.error()); SpanData modified = SpanDataBuilder.newBuilder(TEST_SPAN_DATA) .setStatus(Status.create(StatusCanonicalCode.ERROR, "ABORTED")) .build(); assertThat(modified.getStatus()).isEqualTo(Status.create(StatusCanonicalCode.ERROR, "ABORTED")); }
@Test void equalsHashCode() { assertThat(SpanDataBuilder.newBuilder(TEST_SPAN_DATA).build()).isEqualTo(TEST_SPAN_DATA); EqualsTester tester = new EqualsTester(); tester .addEqualityGroup( SpanDataBuilder.newBuilder(TEST_SPAN_DATA).build(), SpanDataBuilder.newBuilder(TEST_SPAN_DATA).build()) .addEqualityGroup( SpanDataBuilder.newBuilder(TEST_SPAN_DATA) .setStatus(Status.create(StatusCanonicalCode.ERROR, "ABORTED")) .build()); tester.testEquals(); }