### Question:
TipsAndTricksServiceImpl implements TipsAndTricksService { @Override public PageableDto<TipsAndTricksDtoResponse> find(Pageable page, List<String> tags) { Page<TipsAndTricks> pages; if (tags == null || tags.isEmpty()) { pages = tipsAndTricksRepo.findAllByOrderByCreationDateDesc(page); } else { List<String> lowerCaseTags = tags.stream() .map(String::toLowerCase) .collect(Collectors.toList()); pages = tipsAndTricksRepo.find(page, lowerCaseTags); } return getPagesWithTipsAndTricksResponseDto(pages); }  @CacheEvict(value = CacheConstants.TIPS_AND_TRICKS_CACHE_NAME, allEntries = true) @Override TipsAndTricksDtoResponse save(TipsAndTricksDtoRequest tipsAndTricksDtoRequest, MultipartFile image,
                                         String email); @CacheEvict(value = CacheConstants.TIPS_AND_TRICKS_CACHE_NAME, allEntries = true) @Override void update(TipsAndTricksDtoManagement tipsAndTricksDtoManagement,
                       MultipartFile image); @Cacheable(value = CacheConstants.TIPS_AND_TRICKS_CACHE_NAME) @Override PageableDto<TipsAndTricksDtoResponse> findAll(Pageable page); @Override PageableDto<TipsAndTricksDtoResponse> find(Pageable page, List<String> tags); @Override TipsAndTricksDtoResponse findDtoById(Long id); @CacheEvict(value = CacheConstants.TIPS_AND_TRICKS_CACHE_NAME, allEntries = true) @Override void delete(Long id); @CacheEvict(value = CacheConstants.TIPS_AND_TRICKS_CACHE_NAME, allEntries = true) @Override void deleteAll(List<Long> listId); TipsAndTricks findById(Long id); @Override TipsAndTricksDtoManagement findManagementDtoById(Long id); @Override PageableDto<SearchTipsAndTricksDto> search(String searchQuery); @Override Long getAmountOfWrittenTipsAndTrickByUserId(Long id);  }### Answer:
@Test void findTest() { List<TipsAndTricks> tipsAndTricks = Collections.singletonList(ModelUtils.getTipsAndTricks()); PageRequest pageRequest = PageRequest.of(0, 2); Page<TipsAndTricks> page = new PageImpl<>(tipsAndTricks, pageRequest, tipsAndTricks.size()); List<TipsAndTricksDtoResponse> dtoList = Collections.singletonList(ModelUtils.getTipsAndTricksDtoResponse()); PageableDto<TipsAndTricksDtoResponse> pageableDto = new PageableDto<>(dtoList, dtoList.size(), 0,1); when(modelMapper.map(tipsAndTricks.get(0), TipsAndTricksDtoResponse.class)).thenReturn(dtoList.get(0)); when(tipsAndTricksRepo.find(pageRequest, Collections.singletonList(ModelUtils.getTag().getName()))) .thenReturn(page); when((tipsAndTricksRepo.findAllByOrderByCreationDateDesc(pageRequest))).thenReturn(page); PageableDto<TipsAndTricksDtoResponse> actual = tipsAndTricksService.find(pageRequest, Collections.singletonList(ModelUtils.getTag().getName())); assertEquals(pageableDto, actual); assertEquals(pageableDto, tipsAndTricksService.find(pageRequest, null)); }