@Test public void findAllWhenNotRecords() { List<FavoritePlace> result = new ArrayList<>(); when(repo.findAllByUserEmail(anyString())).thenReturn(result); assertEquals(result, favoritePlaceService.findAllByUserEmail(TestConst.EMAIL)); }
@Override public List<FavoritePlaceDto> findAllByUserEmail(String email) { log.info(LogMessage.IN_FIND_ALL); return repo.findAllByUserEmail(email).stream().map(fp -> modelMapper.map(fp, FavoritePlaceDto.class)) .collect(Collectors.toList()); }
FavoritePlaceServiceImpl implements FavoritePlaceService { @Override public List<FavoritePlaceDto> findAllByUserEmail(String email) { log.info(LogMessage.IN_FIND_ALL); return repo.findAllByUserEmail(email).stream().map(fp -> modelMapper.map(fp, FavoritePlaceDto.class)) .collect(Collectors.toList()); } }
FavoritePlaceServiceImpl implements FavoritePlaceService { @Override public List<FavoritePlaceDto> findAllByUserEmail(String email) { log.info(LogMessage.IN_FIND_ALL); return repo.findAllByUserEmail(email).stream().map(fp -> modelMapper.map(fp, FavoritePlaceDto.class)) .collect(Collectors.toList()); }  }
FavoritePlaceServiceImpl implements FavoritePlaceService { @Override public List<FavoritePlaceDto> findAllByUserEmail(String email) { log.info(LogMessage.IN_FIND_ALL); return repo.findAllByUserEmail(email).stream().map(fp -> modelMapper.map(fp, FavoritePlaceDto.class)) .collect(Collectors.toList()); }  @Override FavoritePlaceDto save(FavoritePlaceDto favoritePlaceDto, String userEmail); @Override FavoritePlaceDto update(FavoritePlaceDto favoritePlaceDto, String userEmail); @Override List<FavoritePlaceDto> findAllByUserEmail(String email); @Override @Transactional Long deleteByUserEmailAndPlaceId(Long placeId, String userEmail); @Override FavoritePlace findByPlaceId(Long placeId); @Override PlaceInfoDto getInfoFavoritePlace(Long placeId); @Override PlaceByBoundsDto getFavoritePlaceWithLocation(Long placeId, String email); }
FavoritePlaceServiceImpl implements FavoritePlaceService { @Override public List<FavoritePlaceDto> findAllByUserEmail(String email) { log.info(LogMessage.IN_FIND_ALL); return repo.findAllByUserEmail(email).stream().map(fp -> modelMapper.map(fp, FavoritePlaceDto.class)) .collect(Collectors.toList()); }  @Override FavoritePlaceDto save(FavoritePlaceDto favoritePlaceDto, String userEmail); @Override FavoritePlaceDto update(FavoritePlaceDto favoritePlaceDto, String userEmail); @Override List<FavoritePlaceDto> findAllByUserEmail(String email); @Override @Transactional Long deleteByUserEmailAndPlaceId(Long placeId, String userEmail); @Override FavoritePlace findByPlaceId(Long placeId); @Override PlaceInfoDto getInfoFavoritePlace(Long placeId); @Override PlaceByBoundsDto getFavoritePlaceWithLocation(Long placeId, String email);  }