@Override
    public void updateSensitiveWord(SensitiveWordSaveVO updateReqVO) {
        // 校验唯一性
        validateSensitiveWordExists(updateReqVO.getId());
        validateSensitiveWordNameUnique(updateReqVO.getId(), updateReqVO.getName());

        // 更新
        SensitiveWordDO updateObj = BeanUtils.toBean(updateReqVO, SensitiveWordDO.class);
        sensitiveWordMapper.updateById(updateObj);

        // 刷新缓存
        initLocalCache();
    }
@Test
    public void testUpdateSensitiveWord_success() {
        // mock 数据
        SensitiveWordDO dbSensitiveWord = randomPojo(SensitiveWordDO.class);
        sensitiveWordMapper.insert(dbSensitiveWord);// @Sql: 先插入出一条存在的数据
        // 准备参数
        SensitiveWordSaveVO reqVO = randomPojo(SensitiveWordSaveVO.class, o -> {
            o.setId(dbSensitiveWord.getId()); // 设置更新的 ID
        });

        // 调用
        sensitiveWordService.updateSensitiveWord(reqVO);
        // 校验是否更新正确
        SensitiveWordDO sensitiveWord = sensitiveWordMapper.selectById(reqVO.getId()); // 获取最新的
        assertPojoEquals(reqVO, sensitiveWord);
    }