@Test
    public void testGroupingLevel() throws IOException {
        try (SerializationTester t = new SerializationTester("testGroupingLevel")) {
            GroupingLevel withoutFilter = new GroupingLevel();
            withoutFilter.setMaxGroups(100)
                    .setExpression(createDummyExpression())
                    .getGroupPrototype()
                    .addAggregationResult(
                            new SumAggregationResult()
                                    .setExpression(createDummyExpression()));
            t.assertMatch(withoutFilter);
        }
        try (var t = new SerializationTester("testGroupingLevelWithFilter")) {
            GroupingLevel withFilter = new GroupingLevel();
            withFilter.setMaxGroups(100)
                    .setExpression(createDummyExpression())
                    .setFilter(new RegexPredicateNode("^foo.*", new AttributeNode("attributeA")))
                    .getGroupPrototype()
                    .addAggregationResult(
                            new SumAggregationResult()
                                    .setExpression(createDummyExpression()));
            t.assertMatch(withFilter);
        }
    }
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