### Question:
CategoryService { public Page<CategoryDto> findCategoryByCondition(CategoryDto categoryDto, Pageable pageable) { Specification<Category> condition = (root, query, builder) -> { List<Predicate> predicates = new ArrayList<>(); if (StringUtils.isNotEmpty(categoryDto.getName())) { predicates.add(builder.like(root.get("name"), "%" + categoryDto.getName() + "%")); } return query.where(predicates.toArray(new Predicate[0])).getRestriction(); }; Page<CategoryDto> categoryDtoPage = categoryDao.findAll(condition, pageable).map(categoryMapper::toDto); List<String> ids = categoryDtoPage.getContent().stream() .map(CategoryDto::getId) .collect(Collectors.toList()); Map<String, List<Article>> articleCollect = articleDao.findByCategoryIdIn(ids) .stream() .collect(Collectors.groupingBy(Article::getCategoryId)); categoryDtoPage.forEach(articleInfo -> { if (articleCollect.get(articleInfo.getId()) != null) { articleInfo.setArticleCount(articleCollect.get(articleInfo.getId()).size()); } }); return categoryDtoPage; } CategoryService(CategoryDao categoryDao, ArticleDao articleDao, CategoryMapper categoryMapper); Page<CategoryDto> findCategoryByCondition(CategoryDto categoryDto, Pageable pageable); CategoryDto findCategoryById(String categoryId); void saveOrUpdate(CategoryDto categoryDto); void deleteCategoryByIds(List<String> categoryIds);  }### Answer:
@Test void testFindCategoryByCondition() { Page<CategoryDto> result = categoryService.findCategoryByCondition(new CategoryDto(), null); Assertions.assertEquals(null, result); }