### Question:
ArticleService { public Page<ArticleDto> findArticleByCondition(ArticleDto articleDto, Pageable pageable) { Specification<Article> condition = (root, query, builder) -> { List<javax.persistence.criteria.Predicate> predicates = new ArrayList<>(); if (StringUtils.isNotEmpty(articleDto.getTitle())) { predicates.add(builder.like(root.get("title"), "%" + articleDto.getTitle() + "%")); } if (articleDto.getReviewState() != null) { predicates.add(builder.equal(root.get("reviewState"), articleDto.getReviewState())); } if (StringUtils.isNotEmpty(articleDto.getDescription())) { predicates.add(builder.like(root.get("description"), "%" + articleDto.getDescription() + "%")); } return query.where(predicates.toArray(new javax.persistence.criteria.Predicate[0])).getRestriction(); }; Page<ArticleDto> queryResults = articleDao.findAll(condition, pageable) .map(articleMapper::toDto); queryResults.getContent().forEach( articleParam -> { UserDto userInfo = userServiceRpc.getUserInfo( new UserDto(articleParam.getUserId())) .getData(); if (userInfo != null && userInfo.getId().equals(articleParam.getUserId())) { articleParam.setUserName(userInfo.getUserName()); } } ); return queryResults; } 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 testFindArticleByCondition() { when(userServiceRpc.getUserInfo(new UserDto("111"))).thenReturn(new JsonData<>(true, 0, null, any())); Page<ArticleDto> result = articleService.findArticleByCondition(new ArticleDto(), null); Assertions.assertEquals(null, result); }