public function testFindAndRemove()
{
$query = ['a'];
$options = ['b'];
$modifiedQuery = ['c'];
$modifiedOptions = ['d'];
// This listener will modify the data and options.
$preFindAndRemoveEventListener = new PreFindAndRemoveListener($modifiedQuery, $modifiedOptions);
$eventManager = new EventManager();
$eventManager->addEventListener([Events::preFindAndRemove], $preFindAndRemoveEventListener);
// Ensure that the modified pipeline and options are sent to the doAggregate call.
$collection = $this->getMockCollection($eventManager, ['doFindAndRemove' => [$modifiedQuery, $modifiedOptions]]);
$collection->findAndRemove($query, $options);
}