@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_notExists() {
        // 准备参数
        SensitiveWordSaveVO reqVO = randomPojo(SensitiveWordSaveVO.class);

        // 调用, 并断言异常
        assertServiceException(() -> sensitiveWordService.updateSensitiveWord(reqVO), SENSITIVE_WORD_NOT_EXISTS);
    }