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 shouldFindTwoPrimitiveSetsToBeEqualRegardlessOfOrder() {
        IntSetTypeState1 intTypeState1 = new IntSetTypeState1();
        intTypeState1.id = "ID";
        intTypeState1.intSet = new HashSet<>(Arrays.asList(15, 5));

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

        IntSetTypeState2 intTypeState2 = new IntSetTypeState2();
        intTypeState2.id = "ID";
        intTypeState2.intSet = new HashSet<>(Arrays.asList(5, 15));
        writer2.reset();
        mapper2.writeFlat(intTypeState2, writer2);
        FlatRecord rec2 = writer2.generateFlatRecord();

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

        // The order of the elements in the Set should not matter
        assertThat(FlatRecordTraversalObjectNodeEquality.equals(leftNode, rightNode)).isTrue();
        assertThat(FlatRecordTraversalObjectNodeEquality.equals(rightNode, leftNode)).isTrue();
    }