@Override
    public Long createArticle(ArticleCreateReqVO createReqVO) {
        // 校验分类存在
        validateArticleCategoryExists(createReqVO.getCategoryId());

        // 插入
        ArticleDO article = ArticleConvert.INSTANCE.convert(createReqVO);
        article.setBrowseCount(0); // 初始浏览量
        articleMapper.insert(article);
        // 返回
        return article.getId();
    }
@Test
    public void testCreateArticle_success() {
        // 准备参数
        ArticleCreateReqVO reqVO = randomPojo(ArticleCreateReqVO.class);

        // 调用
        Long articleId = articleService.createArticle(reqVO);
        // 断言
        assertNotNull(articleId);
        // 校验记录的属性是否正确
        ArticleDO article = articleMapper.selectById(articleId);
        assertPojoEquals(reqVO, article);
    }