return groups;
}
private DiscreteOrderItem createDiscreteOrderItem(Long skuId, Double retailPrice, Double salePrice, boolean isDiscountable, int quantity, Order order) {
DiscreteOrderItem item = new DiscreteOrderItemImpl();
Sku sku = catalogService.findSkuById(skuId);
sku.setRetailPrice(new Money(retailPrice));
if (salePrice != null) {
sku.setSalePrice(new Money(salePrice));
} else {
sku.setSalePrice(null);
}
sku.setDiscountable(isDiscountable);
sku.setName("test");
sku = catalogService.saveSku(sku);
item.setSku(sku);
item.setQuantity(quantity);
Product product = new ProductImpl();
product.setDefaultSku(sku);
product = catalogService.saveProduct(product);
item.setProduct(product);
item.setOrder(order);
item = (DiscreteOrderItem) orderItemService.saveOrderItem(item);
return item;
}