### Question:
LoginLogService { public Page<LoginLogDto> findLoginLogByCondition(LoginLogDto loginLogDto, Pageable pageable) { Specification<LoginLog> condition = (root, query, builder) -> { List<Predicate> predicates = new ArrayList<>(); if (StringUtils.isNotEmpty(loginLogDto.getClientIp())) { predicates.add(builder.like(root.get("clientIp"), "%" + loginLogDto.getClientIp())); } return query.where(predicates.toArray(new Predicate[0])).getRestriction(); }; Page<LoginLogDto> queryResults = loginLogDao.findAll(condition, pageable) .map(loginLogMapper::toDto); queryResults.getContent().forEach( optLogList -> { UserDto userInfo = userServiceRpc.getUserInfo( new UserDto(optLogList.getUserId())) .getData(); if (userInfo.getId().equals(optLogList.getUserId())) { optLogList.setUserName(userInfo.getUserName()); } } ); return queryResults; } LoginLogService(LoginLogDao loginLogDao,
	                       LoginLogMapper loginLogMapper,
	                       UserServiceRpc userServiceRpc); Page<LoginLogDto> findLoginLogByCondition(LoginLogDto loginLogDto, Pageable pageable); LoginLogDto findById(String logId); void save(LoginLogDto loginLogDto); void deleteBatch(List<String> logId);  }### Answer:
@Test public void findLoginLogByCondition() { Page<LoginLogDto> dictByCondition = loginLogService.findLoginLogByCondition(new LoginLogDto(), null); Assert.assertTrue(dictByCondition.getTotalElements() > 0); }