$existence =
new EntityExistence('order_line_item',
[], false, false, false,
[]);
$path = 'order_line_items';
$commands =
[new UpdateCommand( $definition,
['referenced_id' => 'new_referenced_id'
],
$primaryKey,
$existence,
$path )];
$stockSubscriber =
new StockUpdater( $this->
getConnectionMock(),
$this->dispatcher,
new StockUpdateFilterProvider([]),
);
$writeContextMock =
$this->
getMockBuilder(WriteContext::
class) ->
disableOriginalConstructor() ->
getMock();
$event =
new PreWriteValidationEvent($writeContextMock,
$commands);
$stockSubscriber->
triggerChangeSet($event);