private function getMockCollection(EventManager $eventManager, array $methods)
{
$collection = $this->getMockBuilder('Doctrine\\MongoDB\\Collection')->setConstructorArgs([$this->database, $this->mongoCollection, $eventManager])->setMethods(array_keys($methods))->getMock();
foreach ($methods as $method => $withValues) {
$collection->expects($this->once())->method($method)->with(...$withValues);
}
return $collection;
}