class SimpleMergeRequestManager implements MergeRequestManager {

    @Override
    public Comment createComment(Resource requestId, User user, String commentStr) {
        if (commentStr.length() > MAX_COMMENT_STRING_LENGTH) {
            throw new IllegalArgumentException("Comment string length must be less than " + MAX_COMMENT_STRING_LENGTH);
        }
        OffsetDateTime now = OffsetDateTime.now();
        Comment comment = commentFactory.createNew(vf.createIRI(COMMENT_NAMESPACE + UUID.randomUUID()));
        comment.setProperty(vf.createLiteral(now), vf.createIRI(_Thing.issued_IRI));
        comment.setProperty(vf.createLiteral(now), vf.createIRI(_Thing.modified_IRI));
        comment.setProperty(user.getResource(), vf.createIRI(_Thing.creator_IRI));
        comment.setProperty(vf.createLiteral(commentStr), vf.createIRI(_Thing.description_IRI));
        MergeRequest mergeRequest = getMergeRequest(requestId).orElseThrow(
                () -> new IllegalArgumentException("MergeRequest " + requestId + " does not exist"));
        comment.setOnMergeRequest(mergeRequest);

        try (RepositoryConnection connection = configProvider.getRepository().getConnection()) {
            connection.add(comment.getModel(), comment.getResource());
        }
        return comment;
    }

}