@Test
    public void requireThatBFloat16SerializationFormatDoesNotChange() {
        byte[] encodedTensor = new byte[]{6, // binary format type
                2, // bfloat16 type
                2, // dimension count
                2, (byte) 'x', (byte) 'y', 2, // dimension xy with size
                1, (byte) 'z', 1, // dimension z with size
                64, 0,   // value 1
                64, 64,  // value 2
        };
        Tensor tensor = Tensor.from("tensor<bfloat16>(xy[],z[]):{{xy:0,z:0}:2.0,{xy:1,z:0}:3.0}");
        assertEquals(Arrays.toString(encodedTensor), Arrays.toString(TypedBinaryFormat.encode(tensor)));
    }
Tests for the dense binary format.

@author bratseth
vespajlib/src/test/java/com/yahoo/tensor/serialization/DenseBinaryFormatTestCase.java