@Test void serialization() throws Exception {
    ByteArrayOutputStream buffer = new ByteArrayOutputStream();

    Span span = base.toBuilder()
      .addAnnotation(1L, "foo")
      .build();

    new ObjectOutputStream(buffer).writeObject(span);

    assertThat(new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray())).readObject())
      .isEqualTo(span);
  }
Test serializable as used in spark jobs. Careful to include all non-standard fields
zipkin/src/test/java/zipkin2/SpanTest.java