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 shouldFindRecordsEqualOnDifferentDataModelsWithDifferentValues() {
        RecordWithSubObject1 left = new RecordWithSubObject1();
        left.id = "ID";
        left.intField = 1;
        left.subObject = new RecordSubObject();
        left.subObject.stringField = "A";
        left.subObject.intField = 1;
        writer1.reset();
        mapper1.writeFlat(left, writer1);
        FlatRecord leftRec = writer1.generateFlatRecord();

        // RecordWithSubObject2 does not have a subObject field
        RecordWithSubObject2 right = new RecordWithSubObject2();
        right.id = "ID";
        right.intField = 1;
        writer2.reset();
        mapper2.writeFlat(right, writer2);
        FlatRecord rightRec = writer2.generateFlatRecord();
        // With fuzzy matching, the records are equal if the intersection of the schemas have the same fields.
        // In this case, `RecordWithSubObject2` does not know about `subObject` so it's not considered in the
        // equality check.
        Assertions.assertThat(FlatRecordTraversalObjectNodeEquality.equals(new FlatRecordTraversalObjectNode(leftRec), new FlatRecordTraversalObjectNode(rightRec))).isTrue();
        Assertions.assertThat(FlatRecordTraversalObjectNodeEquality.equals(new FlatRecordTraversalObjectNode(rightRec), new FlatRecordTraversalObjectNode(leftRec))).isTrue();
    }