private static int readLittleEndianInt(DataInputStream in) throws IOException {
            byte[] data = new byte[4];
            in.readFully(data);
            ByteBuffer buffer = ByteBuffer.wrap(data);
            buffer.order(ByteOrder.LITTLE_ENDIAN);
            return buffer.getInt();
        }
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