public function shouldGeneratePushUriIfNotSet()
{
$config = new Config();
$config->termsUri = 'theTermsUri';
$token = new Token();
$token->setTargetUrl('theTargetUrl');
$token->setGatewayName('theGatewayName');
$token->setDetails($identity = new Identity('id', 'class'));
$notifyToken = new Token();
$notifyToken->setTargetUrl('theNotifyUrl');
$tokenFactory = $this->getMock(GenericTokenFactoryInterface::class);
$tokenFactory->expects($this->once())->method('createNotifyToken')->with('theGatewayName', $this->identicalTo($identity))->will($this->returnValue($notifyToken));
$action = new AuthorizeAction('aTemplate');
$action->setGateway($this->createGatewayMock());
$action->setApi($config);
$action->setGenericTokenFactory($tokenFactory);
$authorize = new Authorize($token);
$authorize->setModel(['location' => 'aLocation', 'merchant' => ['confirmation_uri' => 'theConfirmationUri', 'checkout_uri' => 'theCheckoutUri', 'terms_uri' => 'theTermsUri']]);
$action->execute($authorize);
}