JacksonSpanDecoder { public static Span decodeOne(byte[] span) { try { return decodeOne(JSON_FACTORY.createParser(span)); } catch (IOException e) { throw new UncheckedIOException(e); } }  static List<Span> decodeList(byte[] spans); static List<Span> decodeList(ByteBuffer spans); static Span decodeOne(byte[] span); static Span decodeOne(ByteBuffer span);  }
@Test public void decodeOne() { assertThat(JacksonSpanDecoder.decodeOne(encodedSpan)) .isEqualTo(CLIENT_SPAN); }
@Test public void decodeOne_byteBuffer() { ByteBuf encodedBuf = PooledByteBufAllocator.DEFAULT.buffer(encodedSpan.length); encodedBuf.writeBytes(encodedSpan); try { assertThat(JacksonSpanDecoder.decodeOne(encodedBuf.nioBuffer())) .isEqualTo(CLIENT_SPAN); } finally { encodedBuf.release(); } }