public function it_allows_when_authorization_service_grants_access_without_deferred()
{
$authorizationService = $this->prophesize(AuthorizationService::class);
$authorizationService->isGranted('test_event')->willReturn(true);
$actionEvent = $this->prophesize(ActionEvent::class);
$actionEvent->getParam(QueryBus::EVENT_PARAM_PROMISE)->willReturn(null);
$actionEvent->getParam(MessageBus::EVENT_PARAM_MESSAGE_NAME)->willReturn('test_event');
$routeGuard = new FinalizeGuard($authorizationService->reveal());
$this->assertNull($routeGuard->onFinalize($actionEvent->reveal()));
}