private static String toHexString(byte[] data) {
            char[] table = "0123456789ABCDEF".toCharArray();
            StringBuilder builder = new StringBuilder();
            builder.append("(").append(data.length).append(" bytes)");
            for (int i = 0; i < data.length; i++) {
                if (i % 16 == 0) {
                    builder.append("\n");
                }
                builder.append(table[(data[i] >> 4) & 0xf]);
                builder.append(table[data[i] & 0xf]);
                builder.append(" ");
            }
            return builder.toString();
        }
Tests serialization compatibility across Java and C++. The comparison is performed by comparing serialized Java
object graphs with the content of specific binary files. C++ unit tests serializes
identical data structures into these files.
Note: This test relies heavily on proper implementation of {@link Object#equals(Object)}!
searchlib/src/test/java/com/yahoo/searchlib/aggregation/GroupingSerializationTest.java