public static boolean equals(FlatRecordTraversalObjectNode left, FlatRecordTraversalObjectNode right) {
        if (left == null && right == null) {
            return true;
        }
        if (left == null || right == null) {
            return false;
        }
        if (!left.getSchema().getName().equals(right.getSchema().getName())) {
            return false;
        }
        extractCommonObjectSchema(left, right);

        return compare(left, right);
    }
@Test
    public void shouldFindThatRecordsAreNotEqualBecauseMapValuesDiffer() {
        TypeState1 typeState1 = new TypeState1();
        typeState1.longField = 1L;
        Map<String, SubValue> map1 = new HashMap<>();
        map1.put("A", new SubValue("A", "AA"));
        map1.put("B", new SubValue("B", "BB"));
        map1.put("D", new SubValue("D", "DD"));
        typeState1.simpleMapField = map1;

        writer1.reset();
        mapper1.writeFlat(typeState1, writer1);
        FlatRecord rec1 = writer1.generateFlatRecord();

        TypeState2 typeState2 = new TypeState2();
        typeState2.longField = 1L;
        Map<String, SubValue> map2 = new HashMap<>();
        map2.put("A", new SubValue("A", "AA"));
        map2.put("B", new SubValue("B", "BB"));
        map2.put("C", new SubValue("C", "CC"));
        typeState2.simpleMapField = map2;

        writer2.reset();
        mapper2.writeFlat(typeState2, writer2);
        FlatRecord rec2 = writer2.generateFlatRecord();

        FlatRecordTraversalObjectNode leftNode = new FlatRecordTraversalObjectNode(rec1);
        FlatRecordTraversalObjectNode rightNode = new FlatRecordTraversalObjectNode(rec2);

        assertThat(FlatRecordTraversalObjectNodeEquality.equals(leftNode, rightNode)).isFalse();
        assertThat(FlatRecordTraversalObjectNodeEquality.equals(rightNode, leftNode)).isFalse();
    }