### Question:
ArticleService { public void insertOrUpdateArticle(Map<String, String> userInfo, ArticleDto articleDto) { articleDto.setUserId(userInfo.get("id")); boolean isCreate = false; if (StringUtils.isBlank(articleDto.getId())) { isCreate = true; articleDto.setComment(0); articleDto.setUpvote(new Random().nextInt(20)); articleDto.setVisits(new Random().nextInt(98)); articleDto.setReviewState(ArticleAuditStatus.PASS); articleDto.setImportance(new Random().nextInt(5)); if (articleDto.getIsPublic() == null) { articleDto.setIsPublic(false); } } else { redisService.del("ARTICLE_" + articleDto.getId()); articleTagDao.deleteByArticleIdIn(Collections.singletonList(articleDto.getId())); } Article articleResult = articleDao.save(articleMapper.toEntity(articleDto)); List<ArticleTag> articleTags = Arrays.stream(articleDto.getTagsId().split(",")) .map(tagsId -> new ArticleTag(articleResult.getId(), tagsId)) .collect(Collectors.toList()); articleTagDao.saveAll(articleTags); if (isCreate) { redisService.lSet("ARTICLE_HOT", articleDto); } } ArticleService(ArticleDao articleDao,
	                      ArticleMapper articleMapper,
	                      RedisService redisService,
	                      ArticleTagDao articleTagDao,
	                      TagDao tagDao, TagMapper tagMapper, UserServiceRpc userServiceRpc); Page<ArticleDto> findArticleByCondition(ArticleDto articleDto, Pageable pageable); ArticleDto findArticleById(String articleId); void insertOrUpdateArticle(Map<String, String> userInfo, ArticleDto articleDto); void deleteArticleByIds(List<String> articleIds); void examine(String id);  }### Answer:
@Test void testInsertOrUpdateArticle() { when(redisService.lSet(anyString(), any())).thenReturn(true); articleService.insertOrUpdateArticle(new HashMap<String, String>() {{ put("String", "String"); }}, new ArticleDto()); }