this.context.authenticatedUser();
this.fromApiJsonDeserializer.validateForUpdate(command.json());
final Map<String, Object> changes = new LinkedHashMap<>();
final List<ProductMix> existedProductMixes = this.productMixRepository.findByProductId(productId);
if (CollectionUtils.isEmpty(existedProductMixes)) { throw new ProductMixNotFoundException(productId); }
final Set<String> restrictedIds = new HashSet<>(Arrays.asList(command.arrayValueOfParameterNamed("restrictedProducts")));
// updating with empty array means deleting the existed records.
if (restrictedIds.isEmpty()) {
final List<Long> removedRestrictedProductIds = this.productMixRepository.findRestrictedProductIdsByProductId(productId);