newProduct.setDefaultSku(newDefaultSku);
newProduct = catalogService.saveProduct(newProduct);
Order order = cartService.createNamedOrderForCustomer("Pants Order", customer);
OrderItem orderItem = cartService.addSkuToOrder(order.getId(), newDefaultSku.getId(),
newProduct.getId(), category.getId(), 2);
OrderItem quantityNullOrderItem = cartService.addSkuToOrder(order.getId(), newDefaultSku.getId(),
newProduct.getId(), category.getId(), null);
OrderItem skuNullOrderItem = cartService.addSkuToOrder(order.getId(), null,
null, category.getId(), 2);
OrderItem orderNullOrderItem = cartService.addSkuToOrder(null, newDefaultSku.getId(),
newProduct.getId(), category.getId(), 2);
OrderItem productNullOrderItem = cartService.addSkuToOrder(order.getId(), newDefaultSku.getId(),
null, category.getId(), 2);
OrderItem categoryNullOrderItem = cartService.addSkuToOrder(order.getId(), newDefaultSku.getId(),
newProduct.getId(), null, 2);
assert orderItem != null;
assert skuNullOrderItem == null;
assert quantityNullOrderItem == null;