function it_rethrows_exception_and_rollbacks_transaction_in_catch_exception_command_endpoint(Factory $factory, Transaction $transaction, ServiceLocator $serviceLocator)
{
$command = new CreateCart((string) CartId::generate(), "PLN");
$factory->open()->willReturn($transaction);
$transaction->rollback()->shouldBeCalled();
$this->pre($command, $serviceLocator);
$this->shouldThrow(\Exception::class)->during('catchException', [$command, new \Exception(), $serviceLocator]);
}