public Comment toComment() {
        Comment comment = new Comment();
        comment.setMetadata(new Metadata());
        comment.getMetadata().setName(UUID.randomUUID().toString());

        Comment.CommentSpec spec = new Comment.CommentSpec();
        comment.setSpec(spec);
        spec.setSubjectRef(subjectRef);
        spec.setRaw(raw);
        spec.setContent(content);
        spec.setAllowNotification(allowNotification);

        if (owner != null) {
            spec.setOwner(owner.toCommentOwner());
        }
        return comment;
    }
@Test
    void toComment() throws JSONException {
        CommentRequest commentRequest = createCommentRequest();
        Comment comment = commentRequest.toComment();
        assertThat(comment.getMetadata().getName()).isNotNull();

        comment.getMetadata().setName("fake");
        JSONAssert.assertEquals("""
                {
                    "spec": {
                        "raw": "raw",
                        "content": "content",
                        "allowNotification": true,
                        "subjectRef": {
                            "group": "fake.halo.run",
                            "version": "v1alpha1",
                            "kind": "Fake",
                            "name": "fake"
                        }
                    },
                    "apiVersion": "content.halo.run/v1alpha1",
                    "kind": "Comment",
                    "metadata": {
                        "name": "fake"
                    }
                }
                """,
            JsonUtils.objectToJson(comment),
            true);
    }