*/
public class ShoppingListWriter {
@Aggregator
public ShoppingList sendShoppingList(List<Ingredient> ingredients) {
ShoppingList list = new ShoppingList(ingredients.get(0).getType());
for (Ingredient ingredient : ingredients) {
list.addItem(ingredient);
}
return list;
}