public function testUpdate()
{
$query = ['a'];
$newObj = ['b'];
$options = ['c'];
$modifiedQuery = ['d'];
$modifiedNewObj = ['e'];
$modifiedOptions = ['f'];
// This listener will modify the data and options.
$preUpdateListener = new PreUpdateListener($modifiedQuery, $modifiedNewObj, $modifiedOptions);
$eventManager = new EventManager();
$eventManager->addEventListener([Events::preUpdate], $preUpdateListener);
// Ensure that the modified pipeline and options are sent to the doAggregate call.
$collection = $this->getMockCollection($eventManager, ['doUpdate' => [$modifiedQuery, $modifiedNewObj, $modifiedOptions]]);
$collection->update($query, $newObj, $options);
}