ByteArrayPrimitiveCodec codec = new ByteArrayPrimitiveCodec();
//When
ByteBuffer encoded = codec.encode(byteArray);
byte[] decoded = codec.decode(byteBuffer);
//Then
assertThat(encoded.array()).contains((byte) 2, (byte) 5);
assertThat(decoded).contains((byte)2, (byte)5);
}