@Test void kryoJson2() {
    Kryo kryo = new Kryo();
    kryo.register(Span.class, new JsonV2SpanSerializer());

    Output output = new Output(4096);
    kryo.writeObject(output, TestObjects.CLIENT_SPAN);
    output.flush();
    byte[] serialized = output.getBuffer();

    assertThat(kryo.readObject(new Input(serialized), Span.class))
      .isEqualTo(TestObjects.CLIENT_SPAN);
  }
Example test for how to use Kryo and reuse our encoders
zipkin/src/test/java/zipkin2/codec/KryoTest.java