### Question:
DictService { public Page<DictDto> findDictByCondition(DictDto dictDto, Pageable pageable) { Specification<Dict> condition = (root, query, builder) -> { List<javax.persistence.criteria.Predicate> predicates = new ArrayList<>(); if (StringUtils.isNotEmpty(dictDto.getName())) { predicates.add(builder.like(root.get("name"), "%" + dictDto.getName() + "%")); } if (StringUtils.isNotEmpty(dictDto.getParentId())) { predicates.add(builder.equal(root.get("parentId"), dictDto.getParentId())); } return query.where(predicates.toArray(new javax.persistence.criteria.Predicate[0])).getRestriction(); }; return dictDao.findAll(condition, pageable).map(dictMapper::toDto); } DictService(DictDao dictDao,
	                   DictMapper dictMapper); Page<DictDto> findDictByCondition(DictDto dictDto, Pageable pageable); List<DictDto> fetchDictTreeList(DictDto dictDto); DictDto findDictById(String resId); void saveOrUpdate(DictDto dictDto); void deleteBatch(List<String> resId); List<DictDto> findIdNameTypeByParentId(DictDto dictDto);  }### Answer:
@Test public void findDictByCondition() { QueryVO queryVO = new QueryVO(); Page<DictDto> dictByCondition = dictService.findDictByCondition(new DictDto(), null); Assert.assertTrue(dictByCondition.getTotalElements() > 0); }