JacksonSpanDecoder { public static List<Span> decodeList(byte[] spans) { try { return decodeList(JSON_FACTORY.createParser(spans)); } 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 decodeList_bytes() { assertThat(JacksonSpanDecoder.decodeList(encoded)) .isEqualTo(TRACE); }
@Test public void decodeList_byteBuffer() { ByteBuf encodedBuf = PooledByteBufAllocator.DEFAULT.buffer(encoded.length); encodedBuf.writeBytes(encoded); try { assertThat(JacksonSpanDecoder.decodeList(encodedBuf.nioBuffer())) .isEqualTo(TRACE); } finally { encodedBuf.release(); } }