@Test public void convertToEntityTest() { FavoritePlaceDto favoritePlaceDto = ModelUtils.getFavoritePlaceDto(); Place place = Place.builder().id(favoritePlaceDto.getPlaceId()).build(); FavoritePlace expected = new FavoritePlace(null, favoritePlaceDto.getName(), null, place); assertEquals(expected, favoritePlaceMapper.convert(favoritePlaceDto)); }
@Override public FavoritePlace convert(FavoritePlaceDto dto) { return FavoritePlace.builder() .name(dto.getName()) .place(Place.builder().id(dto.getPlaceId()).build()) .build(); }
FavoritePlaceMapper extends AbstractConverter<FavoritePlaceDto, FavoritePlace> { @Override public FavoritePlace convert(FavoritePlaceDto dto) { return FavoritePlace.builder() .name(dto.getName()) .place(Place.builder().id(dto.getPlaceId()).build()) .build(); } }
FavoritePlaceMapper extends AbstractConverter<FavoritePlaceDto, FavoritePlace> { @Override public FavoritePlace convert(FavoritePlaceDto dto) { return FavoritePlace.builder() .name(dto.getName()) .place(Place.builder().id(dto.getPlaceId()).build()) .build(); }  }
FavoritePlaceMapper extends AbstractConverter<FavoritePlaceDto, FavoritePlace> { @Override public FavoritePlace convert(FavoritePlaceDto dto) { return FavoritePlace.builder() .name(dto.getName()) .place(Place.builder().id(dto.getPlaceId()).build()) .build(); }  @Override FavoritePlace convert(FavoritePlaceDto dto); }
FavoritePlaceMapper extends AbstractConverter<FavoritePlaceDto, FavoritePlace> { @Override public FavoritePlace convert(FavoritePlaceDto dto) { return FavoritePlace.builder() .name(dto.getName()) .place(Place.builder().id(dto.getPlaceId()).build()) .build(); }  @Override FavoritePlace convert(FavoritePlaceDto dto);  }