String orderId="DEMO81015";
String orderItemSeqId="00001";
String shipGroupSeqId="00001";
String shipmentItemSeqId = "00001";
PackingSession packSession = new PackingSession(dispatcher, userLogin, facilityId, null, orderId, shipGroupSeqId);
packSession.addOrIncreaseLine(orderId, orderItemSeqId, shipGroupSeqId, productId, BigDecimal.valueOf(6L), 1,
BigDecimal.valueOf(1000L), false);
String shipmentId = packSession.complete(false);
GenericValue orderHeader = delegator.findOne("OrderHeader", UtilMisc.toMap("orderId", orderId), true);
// Test the OrderShipment is correct
List<GenericValue> orderShipments = delegator.getRelated("OrderShipment", null, null, orderHeader);